diff --git a/package.json b/package.json index 1271331..b17f150 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,6 @@ "protractor": "^5.4.1", "ts-node": "~7.0.1", "tslint": "~5.11.0", - "typescript": "^3.1.1" + "typescript": "3.1.1" } } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 8cfe2f6..11e182b 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,6 +8,7 @@ import { AppComponent } from './app.component'; import { LoginComponent } from './core/login/login.component'; import { SignupComponent } from './core/signup/signup.component'; import { SingleCertificateComponent } from './organization/single-certificate/single-certificate.component'; +import { ErrorComponent } from './errors/error/error.component'; import { AuthGuard } from './guards/auth.guard'; const routes: Routes = [ @@ -16,6 +17,7 @@ const routes: Routes = [ { path: 'student', component: StudentComponent, canActivate: [AuthGuard] }, { path: 'signin', component: LoginComponent }, { path: 'signup', component: SignupComponent }, + { path: '**', component: ErrorComponent }, { path: 'issue/single', component: SingleCertificateComponent, canActivate: [AuthGuard]} ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5acdc46..d8f95e0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -21,6 +21,7 @@ import { NavbarComponent } from './navbar/navbar.component'; import { SingleCertificateComponent } from './organization/single-certificate/single-certificate.component'; import { AuthGuard } from './guards/auth.guard'; +import { ErrorComponent } from './errors/error/error.component'; @NgModule({ declarations: [ @@ -33,6 +34,7 @@ import { AuthGuard } from './guards/auth.guard'; FooterComponent, NavbarComponent, SingleCertificateComponent, + ErrorComponent, ], imports: [ BrowserModule, diff --git a/src/app/errors/error/error.component.css b/src/app/errors/error/error.component.css new file mode 100644 index 0000000..4a1faa7 --- /dev/null +++ b/src/app/errors/error/error.component.css @@ -0,0 +1,9 @@ +.header-logo { + display: block; + margin: 40px auto 10px auto; + padding-top: 10%; + width: 15%; + margin-top: 10px; + min-height: 75px; + min-width: 150px; +} diff --git a/src/app/errors/error/error.component.html b/src/app/errors/error/error.component.html new file mode 100644 index 0000000..5856749 --- /dev/null +++ b/src/app/errors/error/error.component.html @@ -0,0 +1,4 @@ + + +

Error: Page Not Found

+ diff --git a/src/app/errors/error/error.component.spec.ts b/src/app/errors/error/error.component.spec.ts new file mode 100644 index 0000000..ceefd5b --- /dev/null +++ b/src/app/errors/error/error.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ErrorComponent } from './error.component'; + +describe('ErrorComponent', () => { + let component: ErrorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ErrorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ErrorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/errors/error/error.component.ts b/src/app/errors/error/error.component.ts new file mode 100644 index 0000000..725b557 --- /dev/null +++ b/src/app/errors/error/error.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-error', + templateUrl: './error.component.html', + styleUrls: ['./error.component.css'] +}) +export class ErrorComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +}