Skip to content

Commit af2eb34

Browse files
committed
feat: 🎨 add 02 advanced component
1 parent 65280e3 commit af2eb34

File tree

9 files changed

+55
-24
lines changed

9 files changed

+55
-24
lines changed

src/app/topics/01-architecture/architecture/architecture.component.scss

Whitespace-only changes.

src/app/topics/01-architecture/architecture/architecture.component.spec.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/app/topics/01-architecture/architecture/architecture.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { TopicCard } from 'src/app/shared/models';
33

44
@Component({
55
selector: 'app-architecture',
6-
templateUrl: './architecture.component.html',
7-
styleUrls: ['./architecture.component.scss']
6+
templateUrl: './architecture.component.html'
87
})
98
export class ArchitectureComponent {
109

src/app/topics/01-architecture/architecture/architecture.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const routes: Routes = [
1515
declarations: [ArchitectureComponent],
1616
imports: [
1717
RouterModule.forChild(routes),
18-
CommonModule,
1918
SharedComponentsModule
2019
]
2120
})
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 { RouterModule, Routes } from '@angular/router';
4+
import { SharedComponentsModule } from 'src/app/shared/components/shared-components.module';
5+
import { AdvancedComponent } from './advanced.component';
6+
7+
const routes: Routes = [
8+
{
9+
path: '',
10+
component: AdvancedComponent
11+
}
12+
];
13+
14+
@NgModule({
15+
declarations: [AdvancedComponent],
16+
imports: [
17+
RouterModule.forChild(routes),
18+
SharedComponentsModule
19+
]
20+
})
21+
export class AdvancedComponentModule { }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="md:w-1/2">
2+
<h1 class="mb-2 text-1xl font-bold text-gray-800 md:text-3xl">
3+
Advanced Components
4+
</h1>
5+
6+
<p class="pb-8">A few topics to cover in this area:</p>
7+
8+
<app-topic-card [topicCards]="topicCards"></app-topic-card>
9+
10+
</div>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ChangeDetectionStrategy, Component } from '@angular/core';
2+
import { TopicCard } from 'src/app/shared/models';
3+
4+
@Component({
5+
selector: '',
6+
templateUrl: './advanced.component.html',
7+
changeDetection: ChangeDetectionStrategy.OnPush
8+
})
9+
export class AdvancedComponent {
10+
11+
public topicCards: TopicCard[] = [
12+
{title: 'Content projection', url: ''},
13+
{title: 'Custom two-way data bindings', url: ''},
14+
{title: 'ng-template and ng-container', url: ''},
15+
{title: 'Sanitization of HTML content', url: ''},
16+
];
17+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './advanced-component.module';

src/app/topics/topic-listing/topic-listing.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const routes: Routes = [
1515
loadChildren: () => import('../01-architecture/architecture/architecture.module').then(m => m.ArchitectureModule)
1616
},
1717

18+
{
19+
path: 'component',
20+
loadChildren: () => import('../02-advanced-component/advanced-component.module').then(m => m.AdvancedComponentModule)
21+
},
22+
1823
];
1924

2025
@NgModule({

0 commit comments

Comments
 (0)