I am upgrading my current application to AngularJS. I have about 20+ pages and many sub pages in each. To have page navigation, do I have to define all the template URL for each in routing.js file. Do we have any better approach to meet this ? Please advise.
-
if you are using AngularJS V1.x then use github.com/angular-ui/ui-router that supports nested routes.Gary– Gary2016-03-14 04:19:45 +00:00Commented Mar 14, 2016 at 4:19
-
Thanks Gary, article was helpful. One question, for many page navigation do we have to prefer state router only, else can we achieve the same using ngRoute.Chakravarty A– Chakravarty A2016-03-14 04:33:20 +00:00Commented Mar 14, 2016 at 4:33
Add a comment
|
1 Answer
The reason why I recommended nested routes is because you have many pages of pagination and each page having multiple sections. Nesting - Which cannot be done using the ngRoute of 1.x but can be done in Angular2 routing only.
1 Comment
Gary
Sure, I do not see any other way of doing nested routing unless you use a nested routing or use static internal routing in someway for sub sections if you are using ngRoute