Apply a directive conditionally

前端 未结 15 1938
别跟我提以往
别跟我提以往 2020-11-27 15:11

I am using Material 2 to add md-raised-button. I want to apply this directive only if certain condition becomes true.

For example:

<         


        
15条回答
  •  北海茫月
    2020-11-27 15:42

    Maybe it will help someone.

    In the example below I have the my-button.component.html and I want to apply the *appHasPermission directive to the

    That way you don't duplicate the

提交回复
热议问题