Sunday, 25 August 2013

How do I display a route parameter?

How do I display a route parameter?

I'm trying to understand Ember. I can't quite work it out. I currently
have the routes:
/participants
/list
/search/:query
And I'm trying to figure out how to get my search page to display that
query parameter. The navigation works, I just can't figure out how to
display that "query" bit (ie, "You searched for Bennie")
(One thing I tried is that I have an App.ParticipantsSearchController with
a 'searchtext' in it, and I know I can display that with {{searchtext}} in
the template, but even if I try to later do an
App.ParticipantsSearchController.searchtext = 'abc', that doesn't get
updated. So that doesn't seem to do me any good.)
I would really appreciate the help from somebody who understands Ember
better than I do.

No comments:

Post a Comment