Thanks sander I did not configure CORS very well on the server. Now I have fixed it and its returning response but the response is not showing on the page I had to inspect the code and found out it returned object in 4 places. I think I will have to serialize it to the object I have on the client. I dont know how to go about that. I have "Category" class on the server I created "Category" with the same fields in my angular like this
export class Category {
id: number;
name: string;
}
I called the server like this
getCategories (): Observable<Category[]> {
.pipe(
tap(categories` => this.log(`fetched categories`)),
catchError(this.handleError('getCategories', []))
);
}
HTML :
<ul>
<li *ngFor="let cat of categories">
</li>
</ul>
On Monday, November 20, 2017 at 1:47:03 PM UTC+1, olabanji tajudeen wrote: