How to return dummy data instead of a call to the actual service in angular.
getBoardMembers(associationCreditCardAccountId: number): Observable<BoardMember[]> {
//return this.httpClient.get<BoardMember[]>(`v2/AssociationCreditCardAccounts/${associationCreditCardAccountId}/boardmembers`);
let members:BoardMember[] = [];
let member: BoardMember = {
name:"Bilal Qureshi",
email: "bq@gmail.com"
};
let member1: BoardMember = {
name:"David Meredith",
email: "dm@gmail.com"
};
let member2: BoardMember = {
name:"Ashley Edison",
email: "ae@gmail.com"
};
members.push(member);
members.push(member1);
members.push(member2);
return of(members);
}
No comments:
Post a Comment