Skip to content

Route provider a word on trailing slashes

jeme edited this page Apr 2, 2013 · 1 revision

Just like the original $routeProvider, this one will make sure to deal with trailing slashes.

The old one did so by dual adding a route, or rather when you configured the route /photos the $routeProvider would automatically add another route for /photos/ redirecting you to that first route.

The new $routeProvider does it a little bit differently. Instead of adding another route, it will simply match both cases, so when you configure /photos that same route will match /photos/.

Clone this wiki locally