Skip to content

Instantly share code, notes, and snippets.

@corespider
Created February 22, 2022 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corespider/1890e5f4fe82a3936e5b8f619c3b4382 to your computer and use it in GitHub Desktop.
Save corespider/1890e5f4fe82a3936e5b8f619c3b4382 to your computer and use it in GitHub Desktop.
How many types of modules present in Angular
// shared module example
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { CustomerComponent } from './components/customer/customer.component';
import { PercentagePipe } from './pipes/percentage/percentange.pipe';
import { CustomerStyleDirective } from './directives/customer-style/customer-style.directive';
@NgModule({
imports: [ CommonModule ],
exports: [
CommonModule,
CustomerComponent,
PercentagePipe,
CustomerStyleDirective
],
declarations: [ CustomerComponent, CustomerStyleDirective, PercentagePipe ]
})
export class SharedModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment