diff --git a/package.json b/package.json
index c2decf2..416e294 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,9 @@
"@angular/platform-browser": "^5.2.1",
"@angular/platform-browser-dynamic": "^5.2.1",
"@angular/router": "^5.2.1",
+ "@ngrx/core": "^1.2.0",
+ "@ngrx/effects": "^5.0.1",
+ "@ngrx/store": "^5.0.0",
"core-js": "^2.5.3",
"hammerjs": "^2.0.8",
"rxjs": "^5.5.6",
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index ea32beb..7fdd553 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -4,6 +4,8 @@ import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{ path: '', loadChildren: './pages/pages.module#PagesModule' },
{ path: 'auth', loadChildren: './pages/auth/auth.module#AuthModule' },
+ { path: 'errors', loadChildren: './pages/errors/errors.module#ErrorsModule' },
+ { path: '**', redirectTo: 'errors/404' }
];
@NgModule({
diff --git a/src/app/commons/ui/material/material.module.ts b/src/app/commons/ui/material/material.module.ts
index bf16297..06f08f7 100644
--- a/src/app/commons/ui/material/material.module.ts
+++ b/src/app/commons/ui/material/material.module.ts
@@ -6,7 +6,7 @@ import {
MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule,
- MatAutocompleteModule, MatFormFieldModule
+ MatAutocompleteModule, MatFormFieldModule,
} from '@angular/material';
const MATERIAL_MODULES: any[] = [
diff --git a/src/app/pages/auth/auth.module.ts b/src/app/pages/auth/auth.module.ts
index b93bf59..197f5be 100644
--- a/src/app/pages/auth/auth.module.ts
+++ b/src/app/pages/auth/auth.module.ts
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { RouterModule, Routes } from '@angular/router';
import { AuthComponent } from './auth.component';
import { AuthRoutingModule } from './auth-routing.module';
import { SigninComponent } from './signin/signin.component';
diff --git a/src/app/pages/auth/signin/signin.component.html b/src/app/pages/auth/signin/signin.component.html
index 0cdd669..34ad602 100644
--- a/src/app/pages/auth/signin/signin.component.html
+++ b/src/app/pages/auth/signin/signin.component.html
@@ -1,3 +1 @@
-
- signin works!
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/app/pages/auth/signin/signin.component.scss b/src/app/pages/auth/signin/signin.component.scss
index e69de29..1ae1e4f 100644
--- a/src/app/pages/auth/signin/signin.component.scss
+++ b/src/app/pages/auth/signin/signin.component.scss
@@ -0,0 +1,9 @@
+.signin-form {
+ min-width: 150px;
+ max-width: 500px;
+ width: 100%;
+}
+
+.signin-full-width {
+ width: 100%;
+}
\ No newline at end of file
diff --git a/src/app/pages/auth/signin/signin.component.ts b/src/app/pages/auth/signin/signin.component.ts
index ad243d4..983533c 100644
--- a/src/app/pages/auth/signin/signin.component.ts
+++ b/src/app/pages/auth/signin/signin.component.ts
@@ -1,4 +1,8 @@
import { Component, OnInit } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { Form, FormBuilder, FormGroup, FormGroupDirective, FormControl, NgForm, Validators } from '@angular/forms';
+import { ErrorStateMatcher } from '@angular/material/core';
+
@Component({
selector: 'of-auth-signin',
@@ -7,9 +11,19 @@ import { Component, OnInit } from '@angular/core';
})
export class SigninComponent implements OnInit {
- constructor() { }
+ signInForm: FormGroup;
+ returnURL: string;
+
+ constructor(
+ private router: Router,
+ private activatedRoute: ActivatedRoute,
+ ) { }
ngOnInit() {
+ this.returnURL = this.activatedRoute.snapshot.queryParams['returnURL'] || '/';
+ }
+
+ initForm() {
}
}
diff --git a/src/app/pages/errors/e404/e404.component.html b/src/app/pages/errors/e404/e404.component.html
new file mode 100644
index 0000000..f20a4f7
--- /dev/null
+++ b/src/app/pages/errors/e404/e404.component.html
@@ -0,0 +1,3 @@
+
+ e404 works!
+
diff --git a/src/app/pages/errors/e404/e404.component.scss b/src/app/pages/errors/e404/e404.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/errors/e404/e404.component.spec.ts b/src/app/pages/errors/e404/e404.component.spec.ts
new file mode 100644
index 0000000..d8b4265
--- /dev/null
+++ b/src/app/pages/errors/e404/e404.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { E404Component } from './e404.component';
+
+describe('E404Component', () => {
+ let component: E404Component;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ E404Component ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(E404Component);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/errors/e404/e404.component.ts b/src/app/pages/errors/e404/e404.component.ts
new file mode 100644
index 0000000..4230885
--- /dev/null
+++ b/src/app/pages/errors/e404/e404.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-e404',
+ templateUrl: './e404.component.html',
+ styleUrls: ['./e404.component.scss']
+})
+export class E404Component implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/pages/errors/e500/e500.component.html b/src/app/pages/errors/e500/e500.component.html
new file mode 100644
index 0000000..75a4328
--- /dev/null
+++ b/src/app/pages/errors/e500/e500.component.html
@@ -0,0 +1,3 @@
+
+ e500 works!
+
diff --git a/src/app/pages/errors/e500/e500.component.scss b/src/app/pages/errors/e500/e500.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/errors/e500/e500.component.spec.ts b/src/app/pages/errors/e500/e500.component.spec.ts
new file mode 100644
index 0000000..341a53f
--- /dev/null
+++ b/src/app/pages/errors/e500/e500.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { E500Component } from './e500.component';
+
+describe('E500Component', () => {
+ let component: E500Component;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ E500Component ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(E500Component);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/errors/e500/e500.component.ts b/src/app/pages/errors/e500/e500.component.ts
new file mode 100644
index 0000000..cd35ad2
--- /dev/null
+++ b/src/app/pages/errors/e500/e500.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-e500',
+ templateUrl: './e500.component.html',
+ styleUrls: ['./e500.component.scss']
+})
+export class E500Component implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/pages/errors/errors-routing.module.ts b/src/app/pages/errors/errors-routing.module.ts
new file mode 100644
index 0000000..3178dd8
--- /dev/null
+++ b/src/app/pages/errors/errors-routing.module.ts
@@ -0,0 +1,22 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ErrorsComponent } from './errors.component';
+import { E404Component } from './e404/e404.component';
+import { E500Component } from './e500/e500.component';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: ErrorsComponent,
+ children: [
+ { path: '404', component: E404Component },
+ { path: '500', component: E500Component },
+ ]
+ }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class ErrorsRoutingModule { }
diff --git a/src/app/pages/errors/errors.component.html b/src/app/pages/errors/errors.component.html
new file mode 100644
index 0000000..6e1ca1a
--- /dev/null
+++ b/src/app/pages/errors/errors.component.html
@@ -0,0 +1,3 @@
+eheader
+
+efooter
\ No newline at end of file
diff --git a/src/app/pages/errors/errors.component.scss b/src/app/pages/errors/errors.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/errors/errors.component.spec.ts b/src/app/pages/errors/errors.component.spec.ts
new file mode 100644
index 0000000..c569cf7
--- /dev/null
+++ b/src/app/pages/errors/errors.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ErrorsComponent } from './errors.component';
+
+describe('ErrorsComponent', () => {
+ let component: ErrorsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ErrorsComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ErrorsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/errors/errors.component.ts b/src/app/pages/errors/errors.component.ts
new file mode 100644
index 0000000..689bdd8
--- /dev/null
+++ b/src/app/pages/errors/errors.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-errors',
+ templateUrl: './errors.component.html',
+ styleUrls: ['./errors.component.scss']
+})
+export class ErrorsComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/pages/errors/errors.module.ts b/src/app/pages/errors/errors.module.ts
new file mode 100644
index 0000000..d776b71
--- /dev/null
+++ b/src/app/pages/errors/errors.module.ts
@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { ErrorsComponent } from './errors.component';
+import { ErrorsRoutingModule } from './errors-routing.module';
+import { E500Component } from './e500/e500.component';
+import { E404Component } from './e404/e404.component';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ ErrorsRoutingModule
+ ],
+ declarations: [ErrorsComponent, E500Component, E404Component]
+})
+export class ErrorsModule { }
diff --git a/yarn.lock b/yarn.lock
index 23af4f7..decb365 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -164,6 +164,18 @@
dependencies:
tslib "^1.7.1"
+"@ngrx/core@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@ngrx/core/-/core-1.2.0.tgz#882b46abafa2e0e6d887cb71a1b2c2fa3e6d0dc6"
+
+"@ngrx/effects@^5.0.1":
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/@ngrx/effects/-/effects-5.0.1.tgz#cf970a6b8e2f3d3647e795e7040e09a2e7d157ed"
+
+"@ngrx/store@^5.0.0":
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/@ngrx/store/-/store-5.0.0.tgz#483a955ea99a63ee083675ce0596d505e5501747"
+
"@ngtools/json-schema@1.1.0", "@ngtools/json-schema@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922"