Skip to content
This repository was archived by the owner on Apr 12, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 2 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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]}
];

Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -33,6 +34,7 @@ import { AuthGuard } from './guards/auth.guard';
FooterComponent,
NavbarComponent,
SingleCertificateComponent,
ErrorComponent,
],
imports: [
BrowserModule,
Expand Down
9 changes: 9 additions & 0 deletions src/app/errors/error/error.component.css
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 4 additions & 0 deletions src/app/errors/error/error.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<app-navbar></app-navbar>
<img src="assets/jboss.svg" class="header-logo">
<h1 class="text-center"><strong>Error: Page Not Found</strong></h1>
<app-footer></app-footer>
25 changes: 25 additions & 0 deletions src/app/errors/error/error.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 { ErrorComponent } from './error.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/errors/error/error.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-error',
templateUrl: './error.component.html',
styleUrls: ['./error.component.css']
})
export class ErrorComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}