TransitionToRoute of a child controller -- updating the controller/view


#1

Basically, I’m trying to display search results from a third party api…

My route is set up like so (coffeescript):

App.Router.map ->
  @resource 'app', ->
  @resource "search", ->
    @route "results",
      path: ":search_term"

I’ve figured out how to get the model to get refreshed on each

submit: function() {
  this.TransitionToRoute("search.results", encodeURIComponent(this.get("searchTerm")))
}

however, the template/controller still references the old model and shows the old search results…

Am I going about this the right way? or does anyone have a better solution?


#2

I discovered the issue, had the binding set wrong. For example: “@length” instead of “length”.