Angular2 @Input to a property with get/set

前端 未结 4 1107
故里飘歌
故里飘歌 2020-11-30 19:58

I have an Angular2 component in that component it currently has a bunch fields that have @Input() applied before them to allow binding to that property, i.e.



        
4条回答
  •  有刺的猬
    2020-11-30 20:12

    Updated accepted answer to angular 7.0.1 on stackblitz here: https://stackblitz.com/edit/angular-inputsetter?embed=1&file=src/app/app.component.ts

    directives are no more in Component decorator options. So I have provided sub directive to app module.

    thank you @thierry-templier!

提交回复
热议问题