0

I am new to ember. If u find my question silly please dont mind.

I have a route '/lobby' which shows a different options.

when user chooses one particular option i want to create route /lobby/option_choosen(this will be the value which user chosen).

How to create route in ember in this scenario.

bjkpriyanka
  • 151
  • 1
  • 11
  • I shown you an approach in my answer , you can try it with [ember-twiddle.com](http://ember-twiddle.com) and update your question if you find any issue in it – Ember Freak Mar 09 '17 at 08:35

1 Answers1

1

Please read ember guide dynamic segment part for defining routes. and for model preparing you can read dynamic model .

In router.js,

Router.map(function() {
  this.route('lobbies');
  this.route('lobby', { path: '/lobby/:lobby_id' });
});
Ember Freak
  • 12,918
  • 4
  • 24
  • 54