Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 我如何阅读firebase';是否将uid作为正常显示名称?_Angular_Firebase_Firebase Authentication - Fatal编程技术网

Angular 我如何阅读firebase';是否将uid作为正常显示名称?

Angular 我如何阅读firebase';是否将uid作为正常显示名称?,angular,firebase,firebase-authentication,Angular,Firebase,Firebase Authentication,我有一种注册方法: onSubmit(){ this.authService.doRegister(this.email.value, this.password.value) .then(res => { console.log(res); this.errorMessage = ""; this.successMessage = "Your account has been created"; }, err => {

我有一种注册方法:

onSubmit(){

  this.authService.doRegister(this.email.value, this.password.value)
    .then(res => {
      console.log(res);
      this.errorMessage = "";
      this.successMessage = "Your account has been created";
    }, err => {
      console.log(err);
      this.errorMessage = err.message;
      this.successMessage = "";
    })
  }
服务:

doRegister(email, password) {
    return new Promise<any>((resolve, reject) => {
      firebase.auth().createUserWithEmailAndPassword(email, password)
        .then(res => {
          resolve(res);
        }, err => reject(err))
    })
  }
doRegister(电子邮件、密码){
返回新承诺((解决、拒绝)=>{
firebase.auth().createUserWithEmailAndPassword(电子邮件,密码)
。然后(res=>{
决议(res);
},err=>拒绝(err))
})
}
然后是一个显示列表,我希望在其中将帖子与该人的实际姓名而不是该用户ID相关联

     <div class="row">
        <div class="col-md-6">
          <mat-list role="list" *ngFor="let post of posts">
            <mat-list-item role="listitem">Title: {{post.title}}</mat-list-item>
            <mat-list-item role="listitem">Body: {{post.body}} 
</mat-list-item>
            <mat-list-item role="listitem">By: {{post.userId}}</mat-list-item>
                     </mat-list>
        </div>
      </div>

标题:{post.Title}
正文:{post.Body}
发件人:{post.userId}

我怎样才能做到这一点?我读过很多死胡同的帖子,说这是不可能的。是吗?

电子邮件/密码验证没有立即显示用户的真实姓名。您必须提示用户输入其姓名,然后更新其用户配置文件。在那之后,他们登录后就可以使用这个名字了。好的@Doug Stevenson,谢谢你提供的信息,但是你能给我一个关于这个的教程或帖子吗?