5

I have generated a route 'home' and I would like to change my base url '/' to be 'home' i have tried adding this line of code to the router.js

App.Router.reopen({
  rootURL: '/blog/'
});

I have also tried setting my base-url in config/environment.js to '/home/'

Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
nhic0tine
  • 71
  • 1
  • 5

1 Answers1

5
// app/routes/application.js
export default Ember.Route.extend({
    redirect: function () {
        this.transitionTo('home');
    }
});


// router.js
Router.map(function() {
  this.route('home', { path: '/home' });
});
jasonmit
  • 1,268
  • 8
  • 8