How can I call a function inside action handlebars from setupController located in the Route. (Same Q goes for calling function inside controller and not the route itself)
I want my page to analyse the URL parameters and fill some variables based on those parameters.
App.CresRoute = Ember.Route.extend({
setupController: function(){
this.send('testFunction', "Print me");
},
actions: {
testFunction: function(string){
console.log(string);
},
}
});
Returns error: Nothing handled the function 'testFunction'. Obviously my mehtods are more complext and with many parameters and this ise just to demonstrate the problem.
Thanks for all the help!
Aucun commentaire:
Enregistrer un commentaire