4
votes

Assuming I have a few simple routes setup in my Ember app...

MyApp.Router.map(function () {
    this.resource('myresource', { path: '/' }, function () {
        this.route('myroute', { path: '/home/myroute' });
    });
});

The router on my server-side is case-insensitive, so when an end-user whose caps lock is activated types 'WWW.BLAH.COM/HOME/MYROUTE' into their browser, my server responds with the page that launches the Ember app, but after rendering, Ember blows up because no such route exists (Ember seems to care about the case in the path).

I'm curious...is this by design, and is there anything that can be done about it? I'm struggling to understand why Ember cares about the case here. Does it have to do with dynamic parts of the URL (which are not used in this case)?

Note: I noticed this question which discusses the same issue in AngularJS. If there was something similar in Ember I think it would solve my problem here.

1

1 Answers

0
votes

I think that part of it is because Ember.js is an opinionated and they already have their standards set (and it seems like case sensitive routes is one of them).

Searching on the web it seems like having case sensitive routes is very common and mostly preferred according to the W3C guidelines.