Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClientHub.loggedOutView = Em.View.extend({
- templateName: "login",
- LoginFormView: Em.View.extend({
- errorMsg: null,
- error: null,
- username: null,
- password: null,
- submitLogin:function(){
- ClientHub.LoginManager.send('login', {username: this.get('username'),
- password: this.get('password')
- })
- }
- }),
- });
- //inside the state manager
- loginErrState : Em.State.create({
- enter: function(manager, transition){
- view = this.get('parentState').get('view').get('')
- view.set('error', "There was a problem logging you in. Please try again.")
- view.set('')
- },
- exit: function(manager, transition){
- view = this.get('parentState').get('view').get('LoginFormView')
- view.get.set('error', null)
- },
- }),
Add Comment
Please, Sign In to add comment