I\'m new to angularjs and I want to use nested ui-routes for my application. Some code snippets ...
profile.html
-
In this case, angular is informing us: I simply cannot find the state edit_profile. I created working example here
The reason is in fact, that we really have to load 2 js files:
- profile.js
- client_UI.js
both of them must be loaded but both of them cannot declare the same module:
var route = angular.module('route', ["ui.router"])
one of them must be different or just not declare but consume the module:
// client_UI.js
var route = angular.module('client_ui', ["ui.router"])
// profile.js
var route = angular.module('route', ["ui.router", "client_ui"])
or both could be in same module:
// client_UI.js
var route = angular.module('route', ["ui.router"])
// profile.js
var route = angular.module('route')
Check that all working here
讨论(0)