Passing on all directives to a child element of the component

前端 未结 2 1691
耶瑟儿~
耶瑟儿~ 2021-02-13 02:04

I have a few custom directives which are basically designed for . And I have a custom component

There

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 02:13

    In the constructor of the directive you can do some like.

    constructor(
        @Attribute('attributeName') private attributeUno:String, 
        private element:ElementRef
    ) {
        console.log(this.attributeUno);
    }
    

提交回复
热议问题