mercredi 29 avril 2015

How dinamically load route in EmberJS?

Need on change search field - load route with params /search/WORD, path of route, example, /search/:q

How is best way?

  1. In template {{input value=str}} and in controller this.transitionToRoute('search', this.store.find...) . It require loading model in controller and duplicate to route mode:function(){ return this.store.find...}.
  2. In controller call route by url this.transitionToRoute('/search/' + str).

Else?




Aucun commentaire:

Enregistrer un commentaire