Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you change base/root url in ember cli from default root '/' to '/home'?

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/'

like image 475
nhic0tine Avatar asked Jan 24 '15 07:01

nhic0tine


1 Answers

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


// router.js
Router.map(function() {
  this.route('home', { path: '/home' });
});
like image 145
jasonmit Avatar answered Oct 13 '22 16:10

jasonmit