ing
This commit is contained in:
parent
0dfc2fe55b
commit
ec7443f441
|
@ -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",
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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[] = [
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
<p>
|
||||
signin works!
|
||||
</p>
|
||||
<button mat-button>Basic</button>
|
|
@ -0,0 +1,9 @@
|
|||
.signin-form {
|
||||
min-width: 150px;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.signin-full-width {
|
||||
width: 100%;
|
||||
}
|
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
3
src/app/pages/errors/e404/e404.component.html
Normal file
3
src/app/pages/errors/e404/e404.component.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<p>
|
||||
e404 works!
|
||||
</p>
|
0
src/app/pages/errors/e404/e404.component.scss
Normal file
0
src/app/pages/errors/e404/e404.component.scss
Normal file
25
src/app/pages/errors/e404/e404.component.spec.ts
Normal file
25
src/app/pages/errors/e404/e404.component.spec.ts
Normal file
|
@ -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<E404Component>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ E404Component ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(E404Component);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
src/app/pages/errors/e404/e404.component.ts
Normal file
15
src/app/pages/errors/e404/e404.component.ts
Normal file
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
3
src/app/pages/errors/e500/e500.component.html
Normal file
3
src/app/pages/errors/e500/e500.component.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<p>
|
||||
e500 works!
|
||||
</p>
|
0
src/app/pages/errors/e500/e500.component.scss
Normal file
0
src/app/pages/errors/e500/e500.component.scss
Normal file
25
src/app/pages/errors/e500/e500.component.spec.ts
Normal file
25
src/app/pages/errors/e500/e500.component.spec.ts
Normal file
|
@ -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<E500Component>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ E500Component ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(E500Component);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
src/app/pages/errors/e500/e500.component.ts
Normal file
15
src/app/pages/errors/e500/e500.component.ts
Normal file
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
22
src/app/pages/errors/errors-routing.module.ts
Normal file
22
src/app/pages/errors/errors-routing.module.ts
Normal file
|
@ -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 { }
|
3
src/app/pages/errors/errors.component.html
Normal file
3
src/app/pages/errors/errors.component.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div>eheader</div>
|
||||
<router-outlet></router-outlet>
|
||||
<div>efooter</div>
|
0
src/app/pages/errors/errors.component.scss
Normal file
0
src/app/pages/errors/errors.component.scss
Normal file
25
src/app/pages/errors/errors.component.spec.ts
Normal file
25
src/app/pages/errors/errors.component.spec.ts
Normal file
|
@ -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<ErrorsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ErrorsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ErrorsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
src/app/pages/errors/errors.component.ts
Normal file
15
src/app/pages/errors/errors.component.ts
Normal file
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
16
src/app/pages/errors/errors.module.ts
Normal file
16
src/app/pages/errors/errors.module.ts
Normal file
|
@ -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 { }
|
12
yarn.lock
12
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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user