how to best conditional template show in angular 4

后端 未结 3 553
别那么骄傲
别那么骄傲 2021-01-02 02:54

currently, i am practiced angular 4. when a normal user view this then show public content When A Registered user enter the web page then show edit or some content

3条回答
  •  無奈伤痛
    2021-01-02 03:07

    In angular 4 you can use if.. else.. structure for html templates

    You can use it in this way:

    some Content here......
    some Content here .....

    but in your case, the prettiest solutions will be if... then... else... conditional

    
    
    
    some content...
    other content...

提交回复
热议问题