I have a problem with a controller
.factory('Auth', function($firebaseAuth){
var auth = $firebaseAuth();
return auth;
})
.controller('authCtrl', function() {
var authCtrl = this;
authCtrl.user = {
email: '',
password: ''
};
console.log('hoi1');
authCtrl.login = function (){
console.log('hoi2');
};
});
-
<div id="loginModal" class="modal" ng-controller="authCtrl">
<div class="modal-background"></div>
<div class="modal-content">
<div class="modal-body">
<form ng-submit="authCtrl.login()">
<h1>Login</h1>
<p id="loginError"> </p>
<input type="email" name="loginEmail" value="" placeholder="email" class="input" ng-model="authCtrl.user.email">
<br>
<input type="password" name="loginPassword" value="" placeholder="******" class="input" ng-model="password" ng-model="authCtrl.user.password">
<br>
<input type="submit" value="Login">
</form>
</div>
</div>
The controller is always in my body, but I see hoi1
in the console, but when I submit the form, I don't get hoi2
What's wrong?
Sincerely, Jur