Routing without being case-sensitive?


Is there a way to use routing without being case sensitive? For instance, in this example…

ionic start TestApp
cd ./TestApp
ionic g page test
ionic g page testTwo

it’s a requirement that the routing of testTwo matches the case identically:


export class AppComponent {
    public appPages = [
            title: 'Home',
            url: '/home',
            icon: 'home'
            title: 'Test 2b',
            url: '/testTwo',
            icon: 'list'

…and I was wondering for the longest time why this wasn’t working:

url: '/testtwo',


With Ionic 4 and the Angular router, you can do this with a URLSerializer.

Thanks @rapropos!!


Revisiting this post because it’s still on Google’s 1st page of results! If anyone needs help with this, I had to revisit the topic and I just used this solution:

The most popular up-vote worked. I only had to use the import and export class block of code, not the block adding providers.