Hello,
I am currently exploring the possibility of implementing something similar to this code snippet using AngularJS:
$routeProvider
.when('/root/:controllerName/blah/:blahId/blah/:blah', {
templateUrl: '/tmpl/:controllerName/blah/partials/:blah' + '.html',
controller: ':controllerName' + 'Ctrl'
})
While I realize that my example may seem overly elaborate with all the 'blah, blah, blah', I wanted to ensure clarity in my description.
In essence, I aim to achieve a routing structure reminiscent of how Microsoft MVC handles routing to controllers -- aiming for a high level of autonomy:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
Furthermore, I plan to implement LazyLoading for the controllers (as I already have), and hope that it will be compatible with this approach.
If anyone has experience or insights on this method, knows of valuable resources, or can suggest ideas for achieving this goal, I would greatly appreciate your input.
--Thank you in advance