【发布时间】:2020-03-18 13:49:47
【问题描述】:
升级到 Angular 9 我收到以下与包相关的错误:
Compiling @ngx-package : es2015 as esm2015
ERROR in Failed to compile entry-point @ngx-package (es2015 as esm2015) due to compilation errors:
node_modules/@ngx-package/@ngx-package.js:1325:34 - error NG1006: Cannot combine @Input decorators with query decorators
1325 'actions': [{ type: Input }, { type: ContentChild, args: [Component,] },],
这个错误的负责代码如下:
@Input() @ContentChild(Component) actions: Component;
【问题讨论】:
-
搜索该错误消息会引发其他类似问题的问题。不知道为什么这需要一个自我回答的问题? stackoverflow.com/questions/56457566/…
-
你说得对,我没有看到这个问题,我正在那里回答。
-
已经回答了吗?
-
部分,我认为我的回答会给出这个案例解决方案的具体例子,不是吗?
-
这是一个具体的解决方法,但您可能有充分的理由应该避免这样做。原始代码的用例是什么?
标签: angular typescript angular9