How can I pass a generic type parameter to an Angular2 component?

前端 未结 3 982

Let\'s say I got a component with a fixed input parameter type,

@Component({
    selector: \'fixed\',
    template: \'
{{value}}
\' }) e
3条回答
  •  臣服心动
    2020-12-16 12:33

    It seems that when using AOT compilation the only way to do this is to replace the generic type with 'any'. See https://github.com/angular/angular/issues/11057

提交回复
热议问题