UI-Router And Case-Sensitive URLs
Last updated on Feb 17, 2015

If you've ever encountered a situation where your URLs suddenly redirect to 404 when typed in all uppercase (if you haven't, you should check your application for this issue anyway, because sometimes users do weird things like that), there is a simple solution.

Starting with version 0.2.11 of ui-router, you can make urls case insensitive with one config line:

angular.module('App').config(function ($urlMatcherFactoryProvider) {

$urlMatcherFactory also includes a number of interesting features, such as strictMode, which makes ui-router not match trailing slashes in urls. Check out these features in the ui-router docs.

Read docs, have fun!

Back to all articles
We are leading front-end consultancy specializing in React, React Native, and Angular. We build web and mobile apps, train teams and consult on complex projects.

Tel AvivIsrael

New York CityUSA

© 500Tech. Building high-quality software since 2012.