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