在firebase.Promise <any>中访问它

时间:2017-05-13 09:06:58

标签: angular typescript firebase promise

I added an Image with the error我无法在firebase.Promise的then方法中看到这个变量。我也看不到_this。

this._messaging.getToken().then( (currentToken) => {
  if (currentToken) {
    console.log('Ok!!!!!');
  //  _notificationToken = currentToken;
  } else {
    console.log('No Instance ID token available. Request permission to generate one.');
  }
})
  .catch(function (err) {
    console.log('An error occurred while retrieving token. ', err);
  });

0 个答案:

没有答案