I have default application template where i'm inserting a separate view.
<script type="text/x-handlebars">
...default template....
{{view App.LoginView}}
</script>
<script type="text/x-handlebars" data-template-name="login">
<form {{action login on='submit'}}>
...login...
</form>
</script>
I have a view and controller set up for the login view
App.LoginView = Ember.View.extend({
templateName: 'login'
});
App.LoginController = Ember.Controller.extend({
actions: {
login: function() {
console.log('test');
}
}
}
);
Unfortunately the login action doesn't get sent to App.LoginController
but it get sent to the App.ApplicationController
. How do I get the actions to forward to the App.LoginController?
Here's a link to the jsbin - http://jsbin.com/ayAnUJi/6/edit