Skip to content

Commit a78c9f5

Browse files
committed
Add a sub module to group common components
This module declares shared components and exports them. To use in another module you can simply add SharedModule in the imports section.
1 parent b6a13b5 commit a78c9f5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/app/shared/shared.module.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
import { LayoutComponent } from './layout/layout.component';
4+
import { TitleComponent } from './title/title.component';
5+
import { RouterModule } from '@angular/router';
6+
7+
@NgModule({
8+
imports: [
9+
CommonModule,
10+
RouterModule,
11+
],
12+
exports: [
13+
LayoutComponent,
14+
TitleComponent,
15+
],
16+
declarations: [
17+
LayoutComponent,
18+
TitleComponent,
19+
],
20+
})
21+
export class SharedModule { }

0 commit comments

Comments
 (0)