Answer the question
In order to leave comments, you need to log in
How to dynamically load a route in EmberJS?
It is necessary that when entering the search string - there is a transition to a new route
/search/string, respectively, the route path, for example /search/:q
What is the best way to do this?
If in the template {{input value=str}} and in the controller this.transitionToRoute, then you need to load the model in the controller (i.e. duplicate with loading in the route).
There is this.transitionToRoute('/search/' + str) option, but I don't like it.
Answer the question
In order to leave comments, you need to log in
Why don't you like transitionToRoute?
I would do it through the parameters - /search?q=lorem+ipsum
I didn't quite understand about the duplication of the model, in this version it should not be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question