Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229288

Error while Trying to Unsucscribe

$
0
0

I am trying to unsubscribe but i keep on getting Type error uncaught(in promise)
unsubscribe is not a function.
i also tried dispose() i still get same error

ngOnInit(){
this.myq = this.db.object('score/'+this.ids+'/').map(usr => usr);
          this.myq.subscribe(usr => {
  			this.myscore = usr.score;
  			
  			console.log(this.myscore);
  			this.gameon(this.myscore);
  		});

}
ngOnDestroy() {
    this.myq.dispose();
  }

What am i doing wrong?


Viewing all articles
Browse latest Browse all 229288

Trending Articles