mardi 22 mars 2016

Is it possible to make Ember respond to `/app` when rootUrl is `/app/`

In a Rails app with ember-cli, after login I'm redirecting to /app, where the Ember app is mounted. Unfortunately the ember app raises assert in getHistoryPath::

_emberMetalDebug.assert('Path ' + path + ' does not start with the provided rootURL ' + rootURL, rootURLIndex === 0);

Changing the redirect url to /app/ works, but I'm wondering if there is an easy fix to make it accept /app as valid URL for the root path. User are very likely to type in manually /app and the result is a non-functional app. Changing the rootUrl to /app raises different assert in detect():

_emberMetalDebug.assert('rootURL must end with a trailing forward slash e.g. "/app/"', rootURL.charAt(rootURL.length - 1) === '/');




Aucun commentaire:

Enregistrer un commentaire