My project requires dynamic routes to be generated when specific URLs are requested in order to customize the view and display corresponding data uniformly. While adding manual routes with the same templateUrl
and controller
would have made this task simple, the complexity arises from the fact that these routes are dynamically created based on user-defined sitemaps.
The challenge lies in giving users (specifically developers) the ability to define a sitemap where certain nodes will determine whether their children are displayed in the menu or rendered as tiles in a generic view. I have successfully implemented the menu aspect, but I'm now exploring ways to dynamically provide the ngView
with the appropriate template and data for rendering the tiles.
UPDATE:
After some research, I am considering using the otherwise
method of the $routeProvider
service to handle cases where no predefined routes exist for a particular URL. This methodology could potentially serve as a viable solution, but I welcome any suggestions or alternatives that may offer improved functionality. Thank you in advance.