How can I pass an array as Input() from the component template?

后端 未结 3 478
耶瑟儿~
耶瑟儿~ 2021-02-04 23:38

I need to pass an array of values to a component using binding, e.g.

@Component({
    selector: \'my-component\',
    template: \'
3条回答
  •  鱼传尺愫
    2021-02-05 00:25

    Normally you only use input when the component is nested within another component.

    So in another component, something like:

提交回复
热议问题