Ramco Ramco

Ramco Ramco

  • 436
  • 3.4k
  • 546.4k

Error - On Create Component

Apr 20 2024 12:05 PM

Hi

 I have attached image . In Route on CreateComponent it is giving error.

Type '<C>(component: Type<C>, options: { environmentInjector: EnvironmentInjector; hostElement?: Element | undefined; elementInjector?: Injector | undefined; projectableNodes?: Node[][] | undefined; }) => ComponentRef<...>' is not assignable to type 'Type<any>'.
  Type '<C>(component: Type<C>, options: { environmentInjector: EnvironmentInjector; hostElement?: Element | undefined; elementInjector?: Injector | undefined; projectableNodes?: Node[][] | undefined; }) => ComponentRef<...>' provides no match for the signature 'new (...args: any[]): any'.ts(2322)
index.d.ts(2560, 5): The expected type comes from property 'component' which is declared here on type 'Route'
(property) Route.component?: Type<any> | undefined

Thanks


Answers (1)