0
화재가 발생했으나 불행히도 console에 respUser를 넣었을 때 [object object]
을 입력하면 JSON.Stringify
이 입력 오류를 발생 시켰습니다. JSON으로 원형 구조는 그때 변환 angular.toJson
를 사용하지만, 이렇게 저를 도와주세요 작동하지 않았다, 아래 내 코드 .. 당신이 만드는 "캐릭터 라인 화"를 사용한다Json으로 변환 할 때 오류가 발생했습니다.
$scope.logIn = function() {
firebase.auth().signInWithEmailAndPassword($scope.email, $scope.password).then(function (user) {
console.log(user);
$scope.populateUserLocally(user);
}).catch(function (error) {
var errorCode = error.code;
var errorMessage = error.message;
console.log(errorMessage);
});};
$scope.populateUserLocally = function (respUser) {
$scope.userDetails = angular.toJson(respUser); console.log("$scope.userDetails"); };
당신은'respUser.val()'을 사용해야합니다 –
plunkr –