Angular 2 :Uncaught (in promise): RangeError: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded

Angular 2 :Uncaught (in promise): RangeError: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded

我刚开始使用 angular 2。所以我尝试使用 Web 服务显示数据库中的类别。

这是我的 forum.service.ts 文件

   public getCategories(){
        return this.http.get('http://localhost/ForumLaraAngular/public/api/forum').map((res: Response) => res.json());

     }

forum.component.ts:

categories:any;

  constructor(private forumService:ForumService) { }

  ngOnInit(): void {

    this.forumService.getCategories().subscribe((data)=>{this.categories=data;})

}

forum.component.html:

<categories>
<ul>
<li *ngFor="let categ of categories"> {{categ.titre}}</li>
</ul>

</categories>

任何帮助,在此先感谢

从选择器中写入以下代码行

<ul>
<li *ngFor="let categ of categories"> {{categ.titre}}</li>
</ul>