Angular 2- using *ngIf with multiple conditions

前端 未结 3 1530
被撕碎了的回忆
被撕碎了的回忆 2021-02-18 16:12

I\'m unable to selectively display links on my nav-bar. Based on who logs in (user or admin), I want to change which link shows on my nav-bar.

Below is the code for on

3条回答
  •  礼貌的吻别
    2021-02-18 17:05

    I think should be create a boolean properties in component and using it. In stead of writing function or complex expression in template. Function in template reduce performance. Complex expression make it not readble and maintainable.

提交回复
热议问题