From 95bad57562349d91820c89d2dbf169bee64159e9 Mon Sep 17 00:00:00 2001 From: s473561 Date: Sun, 11 Jun 2023 12:05:06 +0200 Subject: [PATCH] routing, numerology page, handling wrong input --- src/app/app-routing.module.ts | 5 +- src/app/app.component.html | 1 + src/app/app.component.ts | 2 +- src/app/app.module.ts | 8 +- .../horoscope-data-container.component.html | 5 +- ...horoscope-data-container.component.spec.ts | 7 ++ .../horoscope-data-container.component.ts | 6 +- src/app/horoscope/horoscope.component.html | 26 ++++--- src/app/horoscope/horoscope.component.ts | 2 +- src/app/mock-login/mock-login.component.css | 0 src/app/mock-login/mock-login.component.html | 1 - src/app/mock-login/mock-login.component.ts | 10 --- src/app/models/horoscope.model.ts | 1 + src/app/models/numerology.model.ts | 4 + src/app/nav-bar/nav-bar.component.css | 29 ++++++++ src/app/nav-bar/nav-bar.component.html | 18 +++++ .../nav-bar.component.spec.ts} | 12 +-- src/app/nav-bar/nav-bar.component.ts | 10 +++ src/app/numerology/numerology.component.css | 72 ++++++++++++++++++ src/app/numerology/numerology.component.html | 26 +++++++ .../numerology/numerology.component.spec.ts | 21 ++++++ src/app/numerology/numerology.component.ts | 39 ++++++++++ .../open-horoscope.service.spec.ts | 0 .../open-horoscope.service.ts | 2 +- .../open-numerology.service.spec.ts | 16 ++++ .../open-numerology.service.ts | 26 +++++++ src/styles.css | 74 +++++++++++++------ 27 files changed, 364 insertions(+), 59 deletions(-) delete mode 100644 src/app/mock-login/mock-login.component.css delete mode 100644 src/app/mock-login/mock-login.component.html delete mode 100644 src/app/mock-login/mock-login.component.ts create mode 100644 src/app/models/numerology.model.ts create mode 100644 src/app/nav-bar/nav-bar.component.css create mode 100644 src/app/nav-bar/nav-bar.component.html rename src/app/{mock-login/mock-login.component.spec.ts => nav-bar/nav-bar.component.spec.ts} (50%) create mode 100644 src/app/nav-bar/nav-bar.component.ts create mode 100644 src/app/numerology/numerology.component.css create mode 100644 src/app/numerology/numerology.component.html create mode 100644 src/app/numerology/numerology.component.spec.ts create mode 100644 src/app/numerology/numerology.component.ts rename src/app/{ => open-horoscope}/open-horoscope.service.spec.ts (100%) rename src/app/{ => open-horoscope}/open-horoscope.service.ts (92%) create mode 100644 src/app/open-numerology/open-numerology.service.spec.ts create mode 100644 src/app/open-numerology/open-numerology.service.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index eb9dd26..d590668 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,14 +1,15 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HoroscopeDataContainerComponent } from './horoscope-data-container/horoscope-data-container.component'; -import {MockLoginComponent} from './mock-login/mock-login.component'; +import { NumerologyComponent } from './numerology/numerology.component'; + const routes: Routes = [ { path: 'horoscope', component: HoroscopeDataContainerComponent }, - { path: 'login', component: MockLoginComponent }, + { path: 'numerology', component: NumerologyComponent }, { path: '', redirectTo: '/horoscope', pathMatch: 'full' }, ]; diff --git a/src/app/app.component.html b/src/app/app.component.html index ef0914d..4ceff86 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -4,4 +4,5 @@ + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 6d0e442..8bc6960 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -7,5 +7,5 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.css'] }) export class AppComponent { - // title = 'my_app'; + title = 'my_app'; } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5d78a59..3969bda 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,15 +6,19 @@ import { AppComponent } from './app.component'; import { HttpClientModule } from '@angular/common/http'; import { HoroscopeComponent } from './horoscope/horoscope.component'; import { FormsModule } from '@angular/forms'; -import { OpenHoroscopeService } from './open-horoscope.service'; +import { OpenHoroscopeService } from './open-horoscope/open-horoscope.service'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { HoroscopeDataContainerComponent } from './horoscope-data-container/horoscope-data-container.component'; +import { NavBarComponent } from './nav-bar/nav-bar.component'; +import { NumerologyComponent } from './numerology/numerology.component'; @NgModule({ declarations: [ AppComponent, HoroscopeComponent, - HoroscopeDataContainerComponent + HoroscopeDataContainerComponent, + NavBarComponent, + NumerologyComponent ], imports: [ BrowserModule, diff --git a/src/app/horoscope-data-container/horoscope-data-container.component.html b/src/app/horoscope-data-container/horoscope-data-container.component.html index 384772c..d0b5b18 100644 --- a/src/app/horoscope-data-container/horoscope-data-container.component.html +++ b/src/app/horoscope-data-container/horoscope-data-container.component.html @@ -1,3 +1,5 @@ + +