I am still very new to AngularJS and am working through setting up my first application. I would like to be able to do the following:
angular.module(\'App.c
Try using a string identifier.
routeProvider.when('/', {templateUrl: 'partials/home.html', controller: 'home'});
When you use a literal, it is looking for a variable called home
, but that doesn't exist in this case.
If you are getting controller is not defined error you have to write your controller name within the quotes.
or define your controller like this
function controllerName()
{
//your code here
}
refer this: Uncaught ReferenceError:Controller is not defined in AngularJS