-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
CerealKiller97
committed
Aug 29, 2019
1 parent
441e076
commit fca8160
Showing
39 changed files
with
392 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import { VideoGamerLayoutModule } from './modules/layouts/video-gamer-layout/video-gamer-layout.module'; | ||
import { Routes, RouterModule, PreloadAllModules } from '@angular/router'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
loadChildren: () => VideoGamerLayoutModule | ||
loadChildren: () => | ||
import('./modules/layouts/video-gamer-layout/video-gamer-layout.module').then(mod => mod.VideoGamerLayoutModule) | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forRoot(routes)], | ||
imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })], | ||
exports: [RouterModule] | ||
}) | ||
export class AppRoutingModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
1 change: 1 addition & 0 deletions
1
src/app/modules/contact/components/contact/contact.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>contact works!</p> |
25 changes: 25 additions & 0 deletions
25
src/app/modules/contact/components/contact/contact.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ContactComponent } from './contact.component'; | ||
|
||
describe('ContactComponent', () => { | ||
let component: ContactComponent; | ||
let fixture: ComponentFixture<ContactComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ContactComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ContactComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/modules/contact/components/contact/contact.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-contact', | ||
templateUrl: './contact.component.html', | ||
styleUrls: ['./contact.component.css'] | ||
}) | ||
export class ContactComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ContactComponent } from './components/contact/contact.component'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: ContactComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
declarations: [ContactComponent], | ||
imports: [CommonModule, RouterModule.forChild(routes)], | ||
exports: [ContactComponent, RouterModule] | ||
}) | ||
export class ContactModule {} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
25 changes: 25 additions & 0 deletions
25
src/app/modules/home/components/home/home.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { HomeComponent } from './home.component'; | ||
|
||
describe('HomeComponent', () => { | ||
let component: HomeComponent; | ||
let fixture: ComponentFixture<HomeComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ HomeComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(HomeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Title } from '@angular/platform-browser'; | ||
|
||
@Component({ | ||
selector: 'app-home', | ||
templateUrl: './home.component.html', | ||
styleUrls: ['./home.component.css'] | ||
}) | ||
export class HomeComponent implements OnInit { | ||
|
||
constructor(private readonly titleService: Title) { } | ||
|
||
ngOnInit() { | ||
this.titleService.setTitle('Home page'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { HomeComponent } from './components/home/home.component'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
pathMatch: 'full', | ||
component: HomeComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
declarations: [HomeComponent], | ||
imports: [CommonModule, RouterModule.forChild(routes)], | ||
exports: [HomeComponent, RouterModule] | ||
}) | ||
export class HomeModule {} |
3 changes: 3 additions & 0 deletions
3
src/app/modules/layouts/video-gamer-layout/comoponents/default/default.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<app-header></app-header> | ||
<app-loading-spinner></app-loading-spinner> | ||
<router-outlet></router-outlet> | ||
<app-footer></app-footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
1 change: 1 addition & 0 deletions
1
src/app/modules/shared-components/components/footer/footer.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>footer works!</p> |
25 changes: 25 additions & 0 deletions
25
src/app/modules/shared-components/components/footer/footer.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FooterComponent } from './footer.component'; | ||
|
||
describe('FooterComponent', () => { | ||
let component: FooterComponent; | ||
let fixture: ComponentFixture<FooterComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ FooterComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(FooterComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
src/app/modules/shared-components/components/footer/footer.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-footer', | ||
templateUrl: './footer.component.html', | ||
styleUrls: ['./footer.component.css'] | ||
}) | ||
export class FooterComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.example-fill-remaining-space { | ||
/* This fills the remaining space, by using flexbox. | ||
Every toolbar row uses a flexbox row layout. */ | ||
flex: 1 1 auto; | ||
} | ||
|
||
.nav-link { | ||
color: whitesmoke; | ||
} |
15 changes: 14 additions & 1 deletion
15
src/app/modules/shared-components/components/header/header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<p>header works!</p> | ||
<mat-toolbar color="primary"> | ||
<span>VideoGamer</span> | ||
|
||
<span class="example-fill-remaining-space"></span> | ||
|
||
<span> | ||
<nav mat-tab-nav-bar> | ||
<button mat-button *ngFor="let link of links" [routerLink]="link.path" routerLinkActive #rla="routerLinkActive" | ||
class="nav-link"> | ||
{{ link.name }} | ||
</button> | ||
</nav> | ||
</span> | ||
</mat-toolbar> |
17 changes: 14 additions & 3 deletions
17
src/app/modules/shared-components/components/header/header.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
export interface Link { | ||
name: string; | ||
path: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-header', | ||
templateUrl: './header.component.html', | ||
styleUrls: ['./header.component.css'] | ||
}) | ||
export class HeaderComponent implements OnInit { | ||
public readonly links: Link[] = [ | ||
{ name: 'Home', path: '' }, | ||
{ name: 'About', path: 'about' }, | ||
{ name: 'Contact', path: 'contact' } | ||
]; | ||
constructor() {} | ||
|
||
constructor() { } | ||
ngOnInit() {} | ||
|
||
ngOnInit() { | ||
trackByFunc(index: number, item: Link): string { | ||
return item.path; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { HeaderComponent } from './header/header.component'; | ||
import { FooterComponent } from './footer/footer.component'; | ||
import { LoadingSpinnerComponent } from './loading-spinner/loading-spinner.component'; | ||
|
||
export { HeaderComponent }; | ||
export { HeaderComponent, FooterComponent, LoadingSpinnerComponent }; |
Empty file.
4 changes: 4 additions & 0 deletions
4
src/app/modules/shared-components/components/loading-spinner/loading-spinner.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div *ngIf="loading"> | ||
<app-fingerprint-spinner [animationDuration]="1000" [size]="100" [color]="'#ff1d5e'"> | ||
</app-fingerprint-spinner> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
...pp/modules/shared-components/components/loading-spinner/loading-spinner.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LoadingSpinnerComponent } from './loading-spinner.component'; | ||
|
||
describe('LoadingSpinnerComponent', () => { | ||
let component: LoadingSpinnerComponent; | ||
let fixture: ComponentFixture<LoadingSpinnerComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ LoadingSpinnerComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(LoadingSpinnerComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
src/app/modules/shared-components/components/loading-spinner/loading-spinner.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-loading-spinner', | ||
templateUrl: './loading-spinner.component.html', | ||
styleUrls: ['./loading-spinner.component.css'] | ||
}) | ||
export class LoadingSpinnerComponent implements OnInit { | ||
@Input() loading: boolean; | ||
|
||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |
Oops, something went wrong.