Open
Description
Description
I want to use ng-admin as an extra module to my already existing app. There are two issues that are currently preventing me to do so:
1) Route name clashing [workaroundable]
- Problem: I already have a 'dashboard' state, hence I get a ui-router error.
- Proposed solution: prefix all child states of 'ng-admin' root state with
ng-admin.
(i.e.ng-admin.dashboard
) - Note: I could workaround this by renaming/prefixing all my states, but apart from the effort that this could mean for a large application, I think it makes sense to have first-level states have any name, then have their children prefixed with it's parent name, since this contributes to clearer state names, and also prevents name clashing among child states.
2) I'd like ng-admin to live within one of the routes/states of my app [not workaroundable afaik]
- Problem: I cannot provide a parent state for the root 'ng-admin' state
- Proposed solution: receive this as an optional parameter via configuration.
var admin = nga.application("my-admin")
.parentState("my-app")
.baseApiUrl("http://localhost:3000/");
Thanks!
P.S.: this project is great! 😃