I'm currently trying to build a simple routing Angular application with a Node/Express backend. Whenever I start up the server however, the page dies. Whenever I am able to get an error, it says "RangeError: Maximum call stack size exceeded".
I'm a bit confused as I know Im not doing anything intensive... What am I missing?
http://plnkr.co/edit/BzkcruqxDAKx5Kp3E26G
app.js
angular.module('NewsEye', ['newsEyeRoutes'])
.controller('mainController', function() {
//bind this to view-model
var vm = this;
vm.message = 'hey there! something is over here...';
})
.controller('homeController', function() {
var vm = this;
vm.message = 'Home page test.'
})
.controller('contactController', function() {
var vm = this;
vm.message = 'Contact test.'
})
app.routes.js
angular.module('newsEyeRoutes', ['ngRoute'])
.config(function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl : 'views/home.html',
controller : 'homeController',
controllerAs: 'home'
})
.when('/contact', {
templateUrl : 'views/contact.html',
controller : 'contactController',
controllerAs: 'contact'
})
$locationProvider.html5Mode(true);
})
server.js, index.html, and a partial view can be found in the plunkr link.