Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49362

Error while Trying to Unsucscribe

$
0
0

@donsplash wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49362

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>