Skip to content

Commit

Permalink
feat: 添加500的页面
Browse files Browse the repository at this point in the history
  • Loading branch information
damingerdai committed Jan 25, 2019
1 parent 3396848 commit 948a3cd
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/app/routes/pages/page500/page500.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div class="app flex-row align-items-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<div class="clearfix">
<h1 class="float-left display-3 mr-4">500</h1>
<h4 class="pt-3">Houston, we have a problem!</h4>
<p class="text-muted">The page you are looking for is temporarily unavailable.</p>
</div>
<div class="input-prepend input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-search"></i></span>
</div>
<input id="prependedInput" class="form-control" size="16" type="text" placeholder="What are you looking for?">
<span class="input-group-append">
<button class="btn btn-info" type="button">Search</button>
</span>
</div>
</div>
</div>
</div>
</div>
5 changes: 5 additions & 0 deletions src/app/routes/pages/page500/page500.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.app {
background: {
color: rgb(228, 229, 230)
}
}
25 changes: 25 additions & 0 deletions src/app/routes/pages/page500/page500.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { Page500Component } from './page500.component';

describe('Page500Component', () => {
let component: Page500Component;
let fixture: ComponentFixture<Page500Component>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ Page500Component ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(Page500Component);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/routes/pages/page500/page500.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-page500',
templateUrl: './page500.component.html',
styleUrls: ['./page500.component.scss']
})
export class Page500Component implements OnInit {

constructor() { }

ngOnInit() {
}

}
10 changes: 9 additions & 1 deletion src/app/routes/pages/pages-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { RegisterComponent } from './register/register.component';
import { Page404Component } from './page404/page404.component';
import { Page500Component } from './page500/page500.component';

const routes: Routes = [
{
Expand All @@ -23,7 +24,14 @@ const routes: Routes = [
path: '404',
component: Page404Component,
data: {
title: '404 Page'
title: 'Page 404'
}
},
{
path: '500',
component: Page500Component,
data: {
title: 'Page 500'
}
},

Expand Down
4 changes: 3 additions & 1 deletion src/app/routes/pages/pages.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { LoginComponent } from './login/login.component';
import { PagesRoutingModule } from './pages-routing.module';
import { RegisterComponent } from './register/register.component';
import { Page404Component } from './page404/page404.component';
import { Page500Component } from './page500/page500.component';

@NgModule({
declarations: [
LoginComponent,
RegisterComponent,
Page404Component
Page404Component,
Page500Component
],
imports: [
SharedModule,
Expand Down

0 comments on commit 948a3cd

Please sign in to comment.