apply custom pipe to whole app

  • create the pipe
  • create a module and import/export the pipe
    • import { KeysPipe } from ‘../keys.pipe’;
      @NgModule({
      imports: [
      CommonModule
      ],
      declarations: [KeysPipe],
      exports: [KeysPipe]
      })
  • for each app module, import the pipe module
    • import { CpipeModule } from ‘app/util/cpipe/cpipe.module’;
      import { SystemAdminComponent } from ‘./system-admin.component’;
      @NgModule({
      imports: [
      CommonModule,
      CpipeModule,
      SystemAdminRoutingModule
      ],
      declarations: [SystemAdminComponent]
      })
Advertisements
This entry was posted in angular4. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s