sebaferreras / Ionic3-MultiLevelSideMenu

Ionic 3 demo of a two-level side menu.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property 'injector' does not exist on type 'typeof AppModule'.

meneva opened this issue · comments

Hello,
I am trying to include your multilevelsideMenu into my ionic3 apps and it was running nicely. But all of a sudden it just showing me injector error "Property 'injector' does not exist on type 'typeof AppModule'." in custom-decorators/side-menu-display-text-conditions.decorator.ts file

Hello @meneva. Could you please check if your app.module.ts file includes these lines of code:

// ...
// ...
export class AppModule {
  // Make the injector to be available in the entire module
  // so we can use it in the custom decorator
  static injector: Injector;

  constructor(injector: Injector) {
    AppModule.injector = injector;
  }
}