1
I am making a directive to create a Wizzard system, where the navigation of this Wizzard will depend on the number of routes that is set on a parent route (Abstract). I need to know if there’s any way when I start a controller, I bring all existing daughter routes to that parent route.
example of routes in a file Routes.js:
$stateProvider
.state("app", { url: "/",
abstract : true,
templateUrl: "templates/app.html",
controller: "appController"
})
.state("app.foo", { url: "/foo",
views: {
'view-foo': {
templateUrl: "views/foo.html",
controller: "fooCtrl"
}
}
})
.state("app.bar", { url: "/bar",
views: {
'view-foo': {
templateUrl: "views/bar.html",
controller: "barCtrl"
}
}
});
In my directive I would need to get a result like ["app.foo","app.bar"]
so that I can from there work in parent controller functions.
Does anyone have any idea how to do that?