From 558cf1b8041beaa848df3556cfb843b5f1627b6b Mon Sep 17 00:00:00 2001 From: Lorenz Detterbeck <lorenz.detterbeck@mni.thm.de> Date: Mon, 5 Mar 2018 11:59:17 +0100 Subject: [PATCH] renamed error landing page component to page not found: delete the old one, create the new one --- src/app/app-routing.module.ts | 4 ++-- ...ding-page.component.scss => app.component.css} | 0 src/app/app.module.ts | 6 +++--- .../error-landing-page.component.html | 2 -- .../error-landing-page.component.ts | 15 --------------- .../page-not-found/page-not-found.component.html | 2 ++ .../page-not-found/page-not-found.component.scss | 0 .../page-not-found.component.spec.ts} | 12 ++++++------ .../page-not-found/page-not-found.component.ts | 15 +++++++++++++++ src/styles.css | 1 + 10 files changed, 29 insertions(+), 28 deletions(-) rename src/app/{error-landing-page/error-landing-page.component.scss => app.component.css} (100%) delete mode 100644 src/app/error-landing-page/error-landing-page.component.html delete mode 100644 src/app/error-landing-page/error-landing-page.component.ts create mode 100644 src/app/page-not-found/page-not-found.component.html create mode 100644 src/app/page-not-found/page-not-found.component.scss rename src/app/{error-landing-page/error-landing-page.component.spec.ts => page-not-found/page-not-found.component.spec.ts} (51%) create mode 100644 src/app/page-not-found/page-not-found.component.ts create mode 100644 src/styles.css diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7754bfdfc..4ebce37e5 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { ErrorLandingPageComponent } from './error-landing-page/error-landing-page.component'; +import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; const routes: Routes = [ -{ path: 'errorpage', component: ErrorLandingPageComponent } +{ path: 'errorpage', component: PageNotFoundComponent } ]; diff --git a/src/app/error-landing-page/error-landing-page.component.scss b/src/app/app.component.css similarity index 100% rename from src/app/error-landing-page/error-landing-page.component.scss rename to src/app/app.component.css diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 042a3bd10..3d313130f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -4,14 +4,14 @@ import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { AppRoutingModule } from './/app-routing.module'; -import { ErrorLandingPageComponent } from './error-landing-page/error-landing-page.component'; +import { AppRoutingModule } from './app-routing.module'; +import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; @NgModule({ declarations: [ AppComponent, - ErrorLandingPageComponent + PageNotFoundComponent ], imports: [ BrowserModule, diff --git a/src/app/error-landing-page/error-landing-page.component.html b/src/app/error-landing-page/error-landing-page.component.html deleted file mode 100644 index 0bc8f6f78..000000000 --- a/src/app/error-landing-page/error-landing-page.component.html +++ /dev/null @@ -1,2 +0,0 @@ -<h1>404</h1> -<h3>The page you were looking for was not found</h3> diff --git a/src/app/error-landing-page/error-landing-page.component.ts b/src/app/error-landing-page/error-landing-page.component.ts deleted file mode 100644 index d7e154644..000000000 --- a/src/app/error-landing-page/error-landing-page.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-error-landing-page', - templateUrl: './error-landing-page.component.html', - styleUrls: ['./error-landing-page.component.scss'] -}) -export class ErrorLandingPageComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/page-not-found/page-not-found.component.html b/src/app/page-not-found/page-not-found.component.html new file mode 100644 index 000000000..d71c481e1 --- /dev/null +++ b/src/app/page-not-found/page-not-found.component.html @@ -0,0 +1,2 @@ +<h1>404</h1> +<h3>The page you were looking for was not found</h3> diff --git a/src/app/page-not-found/page-not-found.component.scss b/src/app/page-not-found/page-not-found.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/error-landing-page/error-landing-page.component.spec.ts b/src/app/page-not-found/page-not-found.component.spec.ts similarity index 51% rename from src/app/error-landing-page/error-landing-page.component.spec.ts rename to src/app/page-not-found/page-not-found.component.spec.ts index 49891d7f5..697a94657 100644 --- a/src/app/error-landing-page/error-landing-page.component.spec.ts +++ b/src/app/page-not-found/page-not-found.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { ErrorLandingPageComponent } from './error-landing-page.component'; +import { PageNotFoundComponent } from './page-not-found.component'; -describe('ErrorLandingPageComponent', () => { - let component: ErrorLandingPageComponent; - let fixture: ComponentFixture<ErrorLandingPageComponent>; +describe('PageNotFoundComponent', () => { + let component: PageNotFoundComponent; + let fixture: ComponentFixture<PageNotFoundComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ErrorLandingPageComponent ] + declarations: [ PageNotFoundComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(ErrorLandingPageComponent); + fixture = TestBed.createComponent(PageNotFoundComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/page-not-found/page-not-found.component.ts b/src/app/page-not-found/page-not-found.component.ts new file mode 100644 index 000000000..31ae4d80f --- /dev/null +++ b/src/app/page-not-found/page-not-found.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-not-found', + templateUrl: './page-not-found.component.html', + styleUrls: ['./page-not-found.component.scss'] +}) +export class PageNotFoundComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 000000000..90d4ee007 --- /dev/null +++ b/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ -- GitLab