Angular 5 Insert dynamic input attributes

后端 未结 3 382
青春惊慌失措
青春惊慌失措 2021-01-24 09:44

I want to insert dynamically attributes to an input html tag, but I don\'t know to to do this:

I\'ve got this code from component side:

import { Componen         


        
3条回答
  •  温柔的废话
    2021-01-24 10:42

    You are following the wrong approach if you want to use attributes to "config" your input field you should use directives instad of a component...
    and if you need to modify the native element on which you are appling your directive use the renderer service shipped with angular

提交回复
热议问题