Angularjs Ui-router : Abstract State + Child States Not Working
I'm trying to use an abstract state but I cannot load the child. My app is setup as following: angular .module('milordApp', [ 'ui.router', 'ngAnimate', 'ngCookies',
Solution 1:
In case that snippet of the abstract state is real (as is), the issue should be fixed like this:
.state('app', {
abstract: true,
url: '/app',
data: {
requireLogin: true
}
// add template for child
template: "<div ui-view></div>",
})
Simply, every state needs to be injected somewhere. If we do not use named views (or even absolute naming) it is expected that:
every child is injected into its parent target
ui-view
Post a Comment for "Angularjs Ui-router : Abstract State + Child States Not Working"