How to use Angular structural directive with multiple inputs

前端 未结 3 1089
栀梦
栀梦 2020-12-12 22:24

I want to implement something similar with angular-permisssion. And with requirement to control the element\'s existance, I need to use angular structural directive.

3条回答
  •  既然无缘
    2020-12-12 22:50

    @Günter Zöchbauer answer is almost correct.

    Actually right now to make his answer working you need to explicitly rename the secondary @Input name. So it should be:

    @Input("permissionIfExcept") 
    set permissionIfExcept(value: string) {
      this._except = value;
      console.log('except: ', value);
    }
    

提交回复
热议问题