我正在学习Angular。我正在https://stackblitz.com/angular/akkkxgnylgd学习angular.io/tutorial英雄之旅。在app/hero.service.ts
中,有以下代码:
@Injectable()
export class HeroService {
private heroesUrl = 'api/heroes'; // URL to web api
constructor(
private http: HttpClient,
private messageService: MessageService) { }
/** GET heroes from the server */
getHeroes (): Observable<Hero[]> {
return this.http.get<Hero[]>(this.heroesUrl)
.pipe(
tap(heroes => this.log(`fetched heroes`)),
catchError(this.handleError('getHeroes', []))
);
}
我试图调查对/api/heroes
的调用。我打开了Chrome开发者工具,但找不到任何对/api/heroes
的http调用的痕迹。如何查看此URL的调用?