Routing without being case-sensitive?


#1

Hi,

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:

app.component.ts

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',
...

Thanks,
Ryan


#2

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


#3

Thanks @rapropos!!

-Ryan