Angular route parameters contraints
问题 I'm coming from the Asp.net MVC world where route constraints are really useful. I'm currently developing an Angular JS SPA that incorporates client side routing. I would also like to add parameter constraints to my client-side routes as in: $.routeProvider.when("/post/:id/:name?") where I'd like to constrain my :id parameter to only be valid when these are numbers. I haven't found anything similar in Angular Docs (which are horrible to say the least). Can it be done? And maybe also parameter