Reputation: 15732
I have an application with more than 1500 pages. I am using angular UI Router for handling routing.
I want to know what is the good practice
Upvotes: 0
Views: 179
Reputation: 1360
My personal recommendation would be to define routing per module as this will simplify the code for the maintainability perspective
From John papa's reference guide
Define routes for views in the module where they exist. Each module should contain the routes for the views in the module.
Why?: Each module should be able to stand on its own.
Why?: When removing a module or adding a module, the app will only contain routes that point to existing views.
Why?: This makes it easy to enable or disable portions of an application without concern over orphaned routes.
you can refer John papa's angular guide here
Upvotes: 5