diff --git a/package.json b/package.json index ef1ddde..e1bb661 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", + "angular2-logger": "^0.6.0", "core-js": "^2.4.1", "rxjs": "^5.1.0", "zone.js": "^0.8.4" diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 197d9f3..3c5c4fa 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -5,25 +5,41 @@ import { WizardBaseComponent } from './wizard-base/wizard-base.component'; import { ModalOneComponent } from './wizard-base/modal-one/modal-one.component'; import { ModalTwoComponent } from './wizard-base/modal-two/modal-two.component'; import { DummyComponent } from './dummy/dummy.component'; +import { LayoutUiComponent } from './layouts/ui.component'; +import { LayoutPrintComponent } from './layouts/print.component'; +import { InvoiceComponent } from './invoice/invoice.component'; const routes: Routes = [ + { path: '', redirectTo: '/wizard', pathMatch: 'full' }, { - path: 'wizard', - component: WizardBaseComponent, + path: '', + component: LayoutUiComponent, children: [ - { path: '1', component: ModalOneComponent }, - { path: '2', component: ModalTwoComponent }, + { + path: 'wizard', + component: WizardBaseComponent, + children: [ + { path: '1', component: ModalOneComponent }, + { path: '2', component: ModalTwoComponent }, + ] + }, + { + path: 'dummy', + component: DummyComponent + }, ] }, { - path: 'dummy', - component: DummyComponent - }, - { path: '', redirectTo: '/wizard', pathMatch: 'full' }, + path: 'print', + component: LayoutPrintComponent, + children: [ + { path: 'invoice', component: InvoiceComponent }, + ], + } ]; @NgModule({ - imports: [ RouterModule.forRoot(routes) ], + imports: [ RouterModule.forRoot(routes, { useHash: true }) ], exports: [ RouterModule ] }) export class AppRoutingModule { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index aa95126..126e77b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,6 +11,9 @@ import { ModalOneComponent } from './wizard-base/modal-one/modal-one.component'; import { ModalTwoComponent } from './wizard-base/modal-two/modal-two.component'; import { SharedServiceService } from './services/shared-service.service'; import { DummyComponent } from './dummy/dummy.component'; +import { InvoiceComponent } from './invoice/invoice.component'; +import { LayoutUiComponent } from './layouts/ui.component'; +import { LayoutPrintComponent } from './layouts/print.component'; @NgModule({ declarations: [ @@ -18,7 +21,10 @@ import { DummyComponent } from './dummy/dummy.component'; WizardBaseComponent, ModalOneComponent, ModalTwoComponent, - DummyComponent + DummyComponent, + InvoiceComponent, + LayoutUiComponent, + LayoutPrintComponent, ], imports: [ BrowserModule, diff --git a/src/app/invoice/invoice.component.css b/src/app/invoice/invoice.component.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/invoice/invoice.component.css diff --git a/src/app/invoice/invoice.component.html b/src/app/invoice/invoice.component.html new file mode 100644 index 0000000..951fe4e --- /dev/null +++ b/src/app/invoice/invoice.component.html @@ -0,0 +1,3 @@ +

+ invoice works! +

diff --git a/src/app/invoice/invoice.component.spec.ts b/src/app/invoice/invoice.component.spec.ts new file mode 100644 index 0000000..e3cdfcd --- /dev/null +++ b/src/app/invoice/invoice.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InvoiceComponent } from './invoice.component'; + +describe('InvoiceComponent', () => { + let component: InvoiceComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ InvoiceComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(InvoiceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/invoice/invoice.component.ts b/src/app/invoice/invoice.component.ts new file mode 100644 index 0000000..459cc17 --- /dev/null +++ b/src/app/invoice/invoice.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-invoice', + templateUrl: './invoice.component.html', + styleUrls: ['./invoice.component.css'] +}) +export class InvoiceComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/layouts/print.component.html b/src/app/layouts/print.component.html new file mode 100644 index 0000000..0680b43 --- /dev/null +++ b/src/app/layouts/print.component.html @@ -0,0 +1 @@ + diff --git a/src/app/layouts/print.component.ts b/src/app/layouts/print.component.ts new file mode 100644 index 0000000..d7ff928 --- /dev/null +++ b/src/app/layouts/print.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'layout-print', + templateUrl: './print.component.html', +}) +export class LayoutPrintComponent { + +} diff --git a/src/app/layouts/ui.component.html b/src/app/layouts/ui.component.html new file mode 100644 index 0000000..a7fa37b --- /dev/null +++ b/src/app/layouts/ui.component.html @@ -0,0 +1,5 @@ +Header +
+ +
+Footer diff --git a/src/app/layouts/ui.component.ts b/src/app/layouts/ui.component.ts new file mode 100644 index 0000000..a9298be --- /dev/null +++ b/src/app/layouts/ui.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'layout-ui', + templateUrl: './ui.component.html', +}) +export class LayoutUiComponent { + +} -- libgit2 0.21.2