Skip to content

Instantly share code, notes, and snippets.

@zeppelin
Created October 4, 2014 17:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeppelin/435da698aac0faec23f0 to your computer and use it in GitHub Desktop.
Save zeppelin/435da698aac0faec23f0 to your computer and use it in GitHub Desktop.
Including locale in the URL in Ember.js
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource('select-country');
this.resource('root', { path: config.locale }, function() {
this.resource('register');
this.resource('login');
// ...
});
});
export default Router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment