如图:将指令名 当做一个输入型变量 用在set 方法前,在使用的时候,只需 <div [appDrap]="true"></div> 即可
angular 输入型指令directive
原文:https://www.cnblogs.com/maochunyan/p/9542787.html