Skip to content

Instantly share code, notes, and snippets.

@jackkitley
Created February 4, 2013 12:10
Show Gist options
  • Save jackkitley/4706392 to your computer and use it in GitHub Desktop.
Save jackkitley/4706392 to your computer and use it in GitHub Desktop.
Router transition problemo....
{{#linkTo catalogue.item item}
App.Router.map(function() {
this.resource('catalogue', function() {
this.route('index');
this.route('search', { path: ':searchvalue' });
this.route('item', {path: '/view/:itemguid'});
});
});
App.CatalogueItemRoute = Ember.Route.extend({
model: function(params) {
return {itemguid: params.itemguid};
},
setupController: function(controller, model) {
controller.show(model);
console.log("GOT INTO CATALOGUE ITEM");
},
serialize: function(model) {
return {itemguid: Em.get(model, 'itemguid')}
}
});
<script type="text/x-handlebars" data-template-name="catalogueitem">
Some data
</script>
Message i get : "Transitioned into 'catalogue.item' " - but it NEVER switches to the template...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment