2017-12-11 11 views
0

가 없습니다 (버튼 클릭이 트리거) AngularFire2 탈퇴가 나는 많은 사람들이 가입 얻을 그렇지 않으면 내 이전 subscribtions을 취소하려고 메신저와 권한 오류를 체결하는 signout의 method.Before을 쓰기 위해 노력하고 있어요 함수

console.log(this.profileData); 
this.profileData.unsubscribe(); 

    this.app.auth().signOut().then(function() { 

    alert("you successfully signed out"); 

    }, function(error) { 
    alert("error"); 
    }); 

내가 구독하는 방법이다

this.profileData = this.fire.authState.switchMap(auth => this.db.object(`profile/${auth.uid}`).valueChanges()); 
    this.profileData.subscribe(profile =>{... 

enter image description here

+0

이 질문은 아직 활성 상태입니다. –

답변

0

unsubscribe은 구독을위한 인터페이스이며 this.profileData.subscribe(...)에 의해 반환됩니다. 현재 Observable에 this.profileData이 할당 된 것으로 보입니다.