2
현재 내 앱 프로젝트의 firebase v3에 전달되었지만 인증 시스템이 작동하지 않아 그 이유를 알 수 없습니다.Ionic with Firebase V.3 인증
.controller('loginCtrl', function($scope) {
$scope.loginEmail = function(){
firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
});
};
})
.controller('signinCtrl', function($scope) {
$scope.signupEmail = function(){
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
});
};
});
및 내 양식 :
ReferenceError: email is not defined
누구든지 나를 도울 수 :
<form>
<ion-list>
<label class="item item-input">
<span class="input-label">Username</span>
<input type="text" placeholder="enter username..." ng-model="data.username">
</label>
<label class="item item-input">
<span class="input-label">Email</span>
<input type="email" placeholder="[email protected]" ng-model="data.email">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input type="password" placeholder="At least 6 characters" ng-model="data.password">
</label>
</ion-list>
<button class="button button-stable button-block" ng-click="signupEmail()">Done</button>
</form>
크롬 콘솔은 저에게이 메시지를 반환 여기 내 코드는?
그것은 작품입니다! 여전히 오류는 거의 없지만 해결해야합니다! 당신의 도움을 주셔서 대단히 감사합니다 ! –
변수를 초기화하는이 방법은 완전히 잘못되었으므로이 방법을 사용하지 않는 것이 좋습니다. –