Last active
October 16, 2017 02:15
-
-
Save fmundaca/b0f02c8ab071168c7cbc6c2be5e6f7cb to your computer and use it in GitHub Desktop.
Llamado a componente login pasandole una funcion que ejecutará asociada a otro controlador
This file contains 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-template on-login="login($login)"></login-template> | |
<!-- login() es una función que esta en el controlador --> | |
<!-- funcion del controlador --> | |
$scope.login = function (user) { | |
$scope.user = user; | |
makeLogin() | |
}; | |
<!-- en el html del componenten --> | |
<div class="login-input"> | |
<button type="submit" ng-click="model.onLogin({$login:model.user})"></button> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment