Skip to content

Commit 6eb25c2

Browse files
committed
2 parents 1306ffe + 277fe4c commit 6eb25c2

File tree

7 files changed

+77
-0
lines changed

7 files changed

+77
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Routes, RouterModule } from '@angular/router';
2+
import { ContactComponent } from './pages/contact/contact.component';
3+
4+
const routes: Routes = [
5+
{
6+
path: '',
7+
component: ContactComponent
8+
}
9+
];
10+
11+
export const ContactRoutes = RouterModule.forChild(routes);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { NgModule } from '@angular/core';
2+
3+
import { SharedModule } from '@app/shared';
4+
import { ContactRoutes } from './contact-routing.module';
5+
import { ContactComponent } from './pages/contact/contact.component';
6+
7+
8+
@NgModule({
9+
declarations: [ContactComponent],
10+
imports: [
11+
ContactRoutes,
12+
13+
SharedModule
14+
]
15+
})
16+
export class ContactModule { }

src/app/modules/contact/pages/contact/contact.component.css

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
contact works!
3+
</p>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* tslint:disable:no-unused-variable */
2+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3+
import { By } from '@angular/platform-browser';
4+
import { DebugElement } from '@angular/core';
5+
6+
import { ContactComponent } from './contact.component';
7+
8+
describe('ContactComponent', () => {
9+
let component: ContactComponent;
10+
let fixture: ComponentFixture<ContactComponent>;
11+
12+
beforeEach(async(() => {
13+
TestBed.configureTestingModule({
14+
declarations: [ ContactComponent ]
15+
})
16+
.compileComponents();
17+
}));
18+
19+
beforeEach(() => {
20+
fixture = TestBed.createComponent(ContactComponent);
21+
component = fixture.componentInstance;
22+
fixture.detectChanges();
23+
});
24+
25+
it('should create', () => {
26+
expect(component).toBeTruthy();
27+
});
28+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-contact',
5+
templateUrl: './contact.component.html',
6+
styleUrls: ['./contact.component.css']
7+
})
8+
export class ContactComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/app/shared/routes/content-layout.routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ export const CONTENT_ROUTES: Routes = [
88
{
99
path: 'about',
1010
loadChildren: './modules/about/about.module#AboutModule'
11+
},
12+
{
13+
path: 'contact',
14+
loadChildren: './modules/contact/contact.module#ContactModule'
1115
}
1216
];

0 commit comments

Comments
 (0)