mardi 4 juillet 2017

setting rootURL causing 404 error on page refresh

If I set language as rootURL this works I am able to go to any route/subroute and current language will be present in url, but on page refresh browser is trying get app from that language folder any thoughts? :/ I am using Ember 1.11.

// router.coffee

`import Ember from 'ember';`
`import config from './config/environment';`

Router = Ember.Router.extend
  location: config.locationType
  rootURL: '/' + localStorage.getItem('locale') + '/'

// config/environment.js

module.exports = function(environment) {
  var ENV = {
    locationType: 'history',
    baseURL: '/'
...

enter image description here




Aucun commentaire:

Enregistrer un commentaire