Angular UI Router - when to use abstract mode / nested / named views?

Failed to determine this from the docs:

My use case: a large SPA, with several "widgets" or "applications" on the page - each with a controller, data and template. preferably each should be a species. Currently, each template is loaded with help ng-includethat is annoying, does not share interests and does not work very well, since the view controller can be initialized before the main ctrl is resolved. It is for this reason that we switched to the UI router. url time is not nested - for example, /pageurl may contain Listview, userview, etc.

I want to move this to a UI router (after I have already moved the existing routing to the UI router and verified that everything is working correctly), and I'm not sure if this is the right way to put widgets / views together. Should I use an abstract view that will contain a template /page(and contains routes) and set each widget as a view inside this abstract? or it will work without the abstract. whether to use named or nested ones (I’ve seen somewhere that the named views are considered a smell of code, I don’t know why). What are the guidelines for choosing between options and what are the best methods for customizing it? I will be happy for any advice on this.

Thanks!

+4
2

, "" url/state , , . , , page.subpage. , . , , , . ui-router wiki .

+1

(, , ), .

, . , /admin, , , , , , /- . , , /admin , ( ui-view ).

docs. :

  • URL- .
  • ui-view (s), .
  • $ .
0

All Articles