“ this.afAuth.authState.map不是函数”

时间:2019-11-22 15:54:58

标签: angular

我想获取但给我错误映射class User(AbstractUser): mobile_number = models.CharField(max_length=50, unique=True, verbose_name=_('Mobile Number'), error_messages={ 'unique': _("A user with that mobile number already exists."), }, ) USERNAME_FIELD = 'mobile_number' REQUIRED_FIELDS = [] objects = MyUserManager() 不是函数:

this.afAuth.authState.map

1 个答案:

答案 0 :(得分:1)

您需要使用rxjs管道来映射Observable。

this.afAuth.authState.pipe(map(auth=>auth));