我剛剛將我在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。 –