Skip to content

Commit

Permalink
feat: init url
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 10, 2020
1 parent c968234 commit 895a3c2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
14 changes: 14 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
<mat-toolbar color="accent">
<mat-toolbar-row>
<button mat-button routerLink="/home" routerLinkActive="active">DevOps</button>
<span class="spacer"></span>
<div class="right">
<button mat-button>案例学习</button>
<button mat-button>模式与原则</button>
<button mat-button>设计 DevOps</button>
<button mat-button>最佳实践</button>
<button mat-button>操作手册</button>
</div>
</mat-toolbar-row>
</mat-toolbar>

<router-outlet></router-outlet>
3 changes: 3 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.spacer {
flex: 1 1 auto;
}
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { AppWikiComponent } from './features/app-wiki/app-wiki.component';
import { HttpClientModule } from '@angular/common/http';
import { HomeComponent } from './presentation/home/home.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CustomMaterialModule } from './shared/custom-material.module';

@NgModule({
declarations: [
Expand All @@ -33,7 +34,8 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
BrowserModule,
AppRoutingModule,
HttpClientModule,
BrowserAnimationsModule
BrowserAnimationsModule,
CustomMaterialModule,
],
providers: [Title],
bootstrap: [AppComponent]
Expand Down
4 changes: 0 additions & 4 deletions src/app/presentation/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<!--The content below is only a placeholder and can be replaced.-->
<div class="container">
<!-- <app-selection-bar-->
<!-- (highlightElement)="highlightElement($event)"-->
<!-- [currentAtomCategory]="category"></app-selection-bar>-->
<app-periodic-table
[selectedMetal]="highlightState"
(currentAtomCategory)="setCurrentAtomCategory($event)"></app-periodic-table>
Expand Down
21 changes: 21 additions & 0 deletions src/app/shared/custom-material.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';

const modules = [
MatToolbarModule,
MatButtonModule,
MatMenuModule
];

@NgModule({
imports: modules,
declarations: [],
providers: [
],
exports: modules,
entryComponents: []
})
export class CustomMaterialModule {
}

0 comments on commit 895a3c2

Please sign in to comment.