-
-
Save darthdeus/4706568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#linkTo catalogue.item item} | |
App.Router.map(function() { | |
this.resource('catalogue', function() { | |
// this.route('index'); - this is automatic | |
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); // why is this here? | |
console.log("GOT INTO CATALOGUE ITEM"); | |
}, | |
serialize: function(model) { | |
return {itemguid: Em.get(model, 'itemguid')} | |
} | |
}); | |
<script type="text/x-handlebars" data-template-name="catalogue.item"> | |
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
because this is a method i call to show the catalogue item data. (controller.show(model); // why is this here?).
i dont user ember data....