2
组件的HTML:TemplateRef需要类型参数
<ng-template #content/> </ng-template>
组件TS:
@ViewChild('content')
public content: TemplateRef;
的Visual Studio消息:
[ts] Generic type 'TemplateRef<C>' requires 1 type argument(s)
我应该只让TemplateRef<any>
? 虽然代码示例似乎从未指定泛型。 这是新的吗?