我刚刚将我在RC5上构建的应用程序升级到最终版本,我对现在应该声明Directives和Pipes的方式感到困惑。我得到这个错误:Angular 2.0发布:管道和指令不再是@Component的属性
ERROR in [default] C:\xampp\htdocs\meriem-car\public\src\app\components\administration.component.ts:12:4 Argument of type '{ moduleId: string; selector: string; directives: typeof LoginComponent[]; templateUrl: string; }' is not assignable to parameter of type 'Component'. Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.
它做到了,谢谢:) –
@ESturzenegger你是否从组件中删除了'directives'? –
sry删除我的问题:“即使将它添加到声明后,它也会显示相同的错误”@StefanSvrkota是的,我做过。有趣的是:管道工程,但错误显示在我的cli。 –