From 6d4db7060ba2682088f26a03b6c509f6a9250821 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sun, 21 Apr 2019 17:52:26 -0400 Subject: [PATCH] Setup routing --- src/app/app.component.html | 61 +------------------------------- src/app/app.component.ts | 20 ++++------- src/app/app.module.ts | 8 +++-- src/app/app.routing.ts | 14 ++++++++ src/app/home/home.component.html | 60 +++++++++++++++++++++++++++++++ src/app/home/home.component.ts | 19 ++++++++++ yarn.lock | 5 +++ 7 files changed, 111 insertions(+), 76 deletions(-) create mode 100644 src/app/app.routing.ts create mode 100644 src/app/home/home.component.html create mode 100644 src/app/home/home.component.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index b67999e..0680b43 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,60 +1 @@ -
-
-
- -
-
-
-
- - -
- -
-
-

Zakary Timson

-
FULL STACK SOFTWARE ENGINEER
-
-
London Ontario, Canada
- - -
-
-
-
-
-
-

About Zak

- Zak was born with a keyboard in hand and was learning his first programming language by thirteen. Nearly - entirely self taught, Zak challenged his programming courses through both highschool and college while - working in the industry to gain professional experience. He is very passionate about technology and as a - lifelong learner it has opened the door to many other hobbies like robotics, space and physics. Some of his - personal projects include a full sized arcade machine, home automation and a power wall for a home solar - system. -
-
-

Projects

-
- -
-
-
-

Information

- Resume -
References
- Manager - Contractor - Teacher - Principle - CD Project Red -
-
- © 2019 ZaksCode -
-
-
+ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1bec817..7969739 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,19 +1,11 @@ -import { Component } from '@angular/core'; -import {AppStore} from './app.store'; -import {Observable} from 'rxjs'; -import {map} from 'rxjs/operators'; +import {Component} from '@angular/core'; @Component({ - selector: 'app-root', - templateUrl: './app.component.html' + selector: 'app-root', + templateUrl: 'app.component.html' }) export class AppComponent { - quote: Observable; - - constructor(private store: AppStore) { - this.quote = store.quotes.pipe(map(quotes => { - let quote = quotes[Math.floor(Math.random() * quotes.length)]; - return quote.text; - })) - } + set title(title: string) { + document.getElementsByTagName('title')[0].innerHTML = `Zaks Code${title ? ` - ${title}` : ''}`; + } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7e891f4..ac76c67 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,27 +3,31 @@ import {NgModule} from '@angular/core'; import {AngularFireModule} from '@angular/fire'; import {AngularFirestoreModule, FirestoreSettingsToken} from '@angular/fire/firestore'; -import {AppComponent} from './app.component'; +import {HomeComponent} from './home/home.component'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {MaterialModule} from './material.module'; import {FormsModule} from '@angular/forms'; import {TypewriterComponent} from './components/typewriter/typewriter.component'; import {SlideShowComponent} from './components/slideShow/slideShow.component'; import {environment} from '../environments/environment'; +import {AppComponent} from './app.component'; +import {AppRouting} from './app.routing'; @NgModule({ declarations: [ AppComponent, + HomeComponent, SlideShowComponent, TypewriterComponent ], imports: [ AngularFireModule.initializeApp(environment.firebase), AngularFirestoreModule, + AppRouting, BrowserModule, BrowserAnimationsModule, FormsModule, - MaterialModule + MaterialModule, ], providers: [ { provide: FirestoreSettingsToken, useValue: {} } diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts new file mode 100644 index 0000000..fcdc5f9 --- /dev/null +++ b/src/app/app.routing.ts @@ -0,0 +1,14 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {HomeComponent} from './home/home.component'; + +@NgModule({ + imports: [ + RouterModule.forRoot([ + {path: '', component: HomeComponent}, + {path: '**', redirectTo: ''} + ]) + ], + exports: [RouterModule] +}) +export class AppRouting {} diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html new file mode 100644 index 0000000..9ee2feb --- /dev/null +++ b/src/app/home/home.component.html @@ -0,0 +1,60 @@ +
+
+
+ +
+
+
+
+ + +
+ Zakary Timson +
+
+

Zakary Timson

+
FULL STACK SOFTWARE ENGINEER
+
+
London Ontario, Canada
+ + +
+
+
+
+
+
+

About Zak

+ Zak was born with a keyboard in hand and was learning his first programming language by thirteen. Nearly + entirely self taught, Zak challenged his programming courses through both highschool and college while + working in the industry to gain professional experience. He is very passionate about technology and as a + lifelong learner it has opened the door to many other hobbies like robotics, space and physics. Some of his + personal projects include a full sized arcade machine, home automation and a power wall for a home solar + system. +
+
+

Projects

+
+ +
+
+
+

Information

+ Resume +
References
+ Manager + Contractor + Teacher + Principle + CD Project Red +
+
+ © 2019 ZaksCode +
+
+
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts new file mode 100644 index 0000000..d77ffb4 --- /dev/null +++ b/src/app/home/home.component.ts @@ -0,0 +1,19 @@ +import { Component } from '@angular/core'; +import {AppStore} from '../app.store'; +import {Observable} from 'rxjs'; +import {map} from 'rxjs/operators'; + +@Component({ + selector: 'home', + templateUrl: './home.component.html' +}) +export class HomeComponent { + quote: Observable; + + constructor(private store: AppStore) { + this.quote = store.quotes.pipe(map(quotes => { + let quote = quotes[Math.floor(Math.random() * quotes.length)]; + return quote.text; + })) + } +} diff --git a/yarn.lock b/yarn.lock index 5693cfc..341ff47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -173,6 +173,11 @@ dependencies: tslib "^1.9.0" +"@angular/fire@~5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@angular/fire/-/fire-5.1.2.tgz#aaf98a3bad27bacbfe422d951bfa7c591abca775" + integrity sha512-XTpS2+Vnw+poY5FmybOH5+iIgorIHnLH1/r/Zltt7iigvxajsTBPKD9wvxsT0/CtsDIOPB2ql9q0SJVK08iD1A== + "@angular/forms@~7.2.0": version "7.2.12" resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-7.2.12.tgz#0ffbbdb2b6fd19bf61cf09e1911d2cbc82b88399"