Route testing
This commit is contained in:
4
src/app/pages/auth/auth.component.html
Normal file
4
src/app/pages/auth/auth.component.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
auth works!
|
||||
</p>
|
||||
<router-outlet></router-outlet>
|
||||
0
src/app/pages/auth/auth.component.scss
Normal file
0
src/app/pages/auth/auth.component.scss
Normal file
25
src/app/pages/auth/auth.component.spec.ts
Normal file
25
src/app/pages/auth/auth.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthComponent } from './auth.component';
|
||||
|
||||
describe('AuthComponent', () => {
|
||||
let component: AuthComponent;
|
||||
let fixture: ComponentFixture<AuthComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AuthComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AuthComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
src/app/pages/auth/auth.component.ts
Normal file
15
src/app/pages/auth/auth.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-auth',
|
||||
templateUrl: './auth.component.html',
|
||||
styleUrls: ['./auth.component.scss']
|
||||
})
|
||||
export class AuthComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
22
src/app/pages/auth/auth.module.ts
Normal file
22
src/app/pages/auth/auth.module.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AuthComponent } from 'app/pages/auth/auth.component';
|
||||
|
||||
export const appRoutes: Routes = [{
|
||||
path: '', component: AuthComponent, children: [
|
||||
{ path: 'signin', loadChildren: './signin/signin.module#SigninModule' },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild(appRoutes),
|
||||
],
|
||||
declarations: [
|
||||
AuthComponent
|
||||
]
|
||||
})
|
||||
export class AuthModule { }
|
||||
3
src/app/pages/auth/signin/signin.component.html
Normal file
3
src/app/pages/auth/signin/signin.component.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
signin works!
|
||||
</p>
|
||||
0
src/app/pages/auth/signin/signin.component.scss
Normal file
0
src/app/pages/auth/signin/signin.component.scss
Normal file
25
src/app/pages/auth/signin/signin.component.spec.ts
Normal file
25
src/app/pages/auth/signin/signin.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SigninComponent } from './signin.component';
|
||||
|
||||
describe('SigninComponent', () => {
|
||||
let component: SigninComponent;
|
||||
let fixture: ComponentFixture<SigninComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SigninComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SigninComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
src/app/pages/auth/signin/signin.component.ts
Normal file
15
src/app/pages/auth/signin/signin.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-signin',
|
||||
templateUrl: './signin.component.html',
|
||||
styleUrls: ['./signin.component.scss']
|
||||
})
|
||||
export class SigninComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
21
src/app/pages/auth/signin/signin.module.ts
Normal file
21
src/app/pages/auth/signin/signin.module.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SigninComponent } from './signin.component';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', component: SigninComponent },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: [
|
||||
SigninComponent
|
||||
],
|
||||
exports: [
|
||||
RouterModule,
|
||||
]
|
||||
})
|
||||
export class SigninModule { }
|
||||
Reference in New Issue
Block a user