How can I call a function inside action handlebars from setupController located in the Route. (Also, how can I call a function inside a controller and not the route itself).
I want my page to analyse the URL parameters and fill in 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);
},
}
});
This returns an error: "Nothing handled the function 'testFunction'."
Obviously my methods are more complex, with many parameters, and this is just to demonstrate the problem.