angularjs - Error: [ng:areq] Argument 'ProjectsController' is not a function, got undefined -
Why are my project controllers undefined? I get this error message from my browser console
You can see that to see this plunker yourself.
'strict use'; Angular .module ( 'projectplanner', [ 'ui.router']) .config (function ($ stateProvider, $ urlRouterProvider) {$ urlRouterProvider.otherwise ( '/ projects'); $ stateProvider .state ( 'projects', {url '/ projects' views: { "menu": {template '! Start your projects'}, 'content': {templateUrl: "projects.html", controller 'ProjectsController'}}}) Kstate ( 'Projectskselected', {url: '/: ProjectId'}) Kstate ( 'Projectskselectedkdates', {url:' / Date /: date, views: {menu: {templateUrl: 'menu. html'}, 'content': {templateUrl: 'dateplanner.html', controller: 'DateplannerController'}}})}); 'Strict use'; Angular Modules ('Project Planner') Controller ('Projects Controller', Function ($ Scope, $ State) {});
You did not include your js correct
& Lt; Script src = "app.js" & gt; & Lt; / Script & gt; & Lt; Script src = "ProjectsController.js" & gt; & Lt; / Script & gt;
Comments
Post a Comment