Friday, October 22, 2021

How to return dummy data instead of a call to the actual service in angular.  


  getBoardMembers(associationCreditCardAccountIdnumber): Observable<BoardMember[]> {

    //return this.httpClient.get<BoardMember[]>(`v2/AssociationCreditCardAccounts/${associationCreditCardAccountId}/boardmembers`);
    let members:BoardMember[] = [];
    let memberBoardMember = {
      name:"Bilal Qureshi",
      email: "bq@gmail.com"
    };
    let member1BoardMember = {
      name:"David Meredith",
      email: "dm@gmail.com"
    };
    let member2BoardMember = {
      name:"Ashley Edison",
      email: "ae@gmail.com"
    };
    members.push(member);
    members.push(member1);
    members.push(member2);
    return of(members);
    
  }

No comments:

Post a Comment