Skip to content

Commit efbea31

Browse files
committed
Angular Material Course
1 parent bbbb272 commit efbea31

File tree

6 files changed

+34
-2
lines changed

6 files changed

+34
-2
lines changed

router.config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
3+
4+
import {Routes} from "@angular/router";
5+
6+
export const routerConfig: Routes = [
7+
{
8+
path: '',
9+
}
10+
];

src/app/app.module.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ import {MatMenuModule} from '@angular/material/menu';
77
import {MatIconModule} from '@angular/material/icon'
88

99
import { TopMenuComponent } from './top-menu/top-menu.component';
10+
import {RouterModule} from "@angular/router";
11+
import { HomeComponent } from './home/home.component';
1012

1113
@NgModule({
1214
declarations: [
1315
AppComponent,
14-
TopMenuComponent
16+
TopMenuComponent,
17+
HomeComponent
1518
],
1619
imports: [
1720
BrowserModule,
1821
BrowserAnimationsModule,
22+
RouterModule.forRoot(),
1923
MatMenuModule,
2024
MatIconModule
2125
],

src/app/home/home.component.css

Whitespace-only changes.

src/app/home/home.component.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
home works!
3+
</p>

src/app/home/home.component.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
2+
3+
@Component({
4+
selector: 'home',
5+
templateUrl: './home.component.html',
6+
styleUrls: ['./home.component.css'],
7+
encapsulation: ViewEncapsulation.None
8+
})
9+
export class HomeComponent implements OnInit {
10+
11+
constructor() { }
12+
13+
ngOnInit() {
14+
}
15+
16+
}

src/styles.css

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/* You can add global styles to this file, and also import other style files */
22

3-
@import "~@angular/material/prebuilt-themes/deeppurple-amber.css";

0 commit comments

Comments
 (0)