ngModel in formControl


I am using JaveBratt’s sample project where I want to assign task to members. All seems working but I am not able to fetch the member data in the ngFor Loop. Following are the codes:


        <ion-label>Assign to</ion-label>
        <ion-select [(ngModel)]="teamMemberModel" formControlName="teamMember">
          <ion-option *ngFor="let member of memberList" [value]="member">
            {{ member.fullName }}


    this.teamProvider.getUserProfile().subscribe( userProfileObservable => {
    .subscribe( teamListObservable => {
      this.memberList = teamListObservable;

Following are the providers details:

getUserProfile(): FirebaseObjectObservable<any> {
    return this.afDb.object(`/userProfile/${this.userId}/`);

getTeamMemberList(teamId:string): FirebaseListObservable<any> { return this.afDb.list(/teamProfile/${teamId}/teamMember); }

I am using Firebase cloud function too:

exports.createTeamMember = functions.database.ref(/teamProfile/{teamId}/teamMembers/{memberId}`)
.onWrite( event => {

if ( {
  console.log("User edited, exiting the function now");

console.log("Accessing parent ref");
return"teamName").once('value', snapshot => {
  const teamId = event.params.teamId;
  const memberId = event.params.memberId;
  const email =;
  const fullName =;
  const teamName = snapshot.val();

  console.log("Creating user...");
  return admin.auth().createUser({
    uid: memberId,
    email: email,
    password: "123456789",
    displayName: fullName
  .then( newUserRecord => {
    console.log("Creating user profile...");
    return admin.database().ref(`/userProfile/${memberId}`).set({
      fullName: fullName,
      email: email,
      teamAdmin: false,
      teamId: teamId,
      teamName: teamName
}).catch((error) => { console.error("Error creating new user:", error); });`

There was a typo…

getTeamMemberList(teamId:string): FirebaseListObservable<any> {
return this.afDb.list(/teamProfile/${teamId}/teamMembers);

Pls excuse this… problem for now. Thanks

1 Like