Created
October 7, 2013 13:30
-
-
Save thebigredgeek/6868057 to your computer and use it in GitHub Desktop.
weird
This file contains hidden or 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
login: () => | |
self = this | |
@$scope.data.toggle = false #toggle the buttons off | |
@FB.login(@$scope.data.email, @$scope.data.password).then ((data)-> # Try to login | |
self.$modalInstance.close # If successful, close the modal | |
email: self.$scope.data.email # and pass the email address | |
),(reason)-> # If failure | |
console.log(reason); | |
self.$scope.data.error = @FBErrCode.parse(reason.code) # set the error string | |
self.$scope.data.toggle = true # and toggle the buttons back on | |
true #Return | |
Compiles to: | |
this.FB.login(this.$scope.data.email, this.$scope.data.password).then((function(data) { | |
return self.$modalInstance.close({ | |
email: self.$scope.data.email | |
}); | |
}), function(reason) { | |
console.log(reason); | |
self.$scope.data.error = this.FBErrCode.parse(reason.code); | |
return self.$scope.data.toggle = true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment