import { NgModule } from '@angular/core'; | |||||
import { RouterModule, Routes } from '@angular/router'; | |||||
import {Einkaufszettel1Component} from "./components/einkaufszettel1/einkaufszettel1.component"; | |||||
import {HomeComponent} from "./components/home/home.component"; | |||||
import {Einkaufszettel2Component} from "./components/einkaufszettel2/einkaufszettel2.component"; | |||||
const routes: Routes = [ | |||||
{ path: '', redirectTo: 'home', pathMatch: 'full'}, | |||||
{ path: 'home', component: HomeComponent}, | |||||
{ path: 'einkaufszettel1', component: Einkaufszettel1Component}, | |||||
{ path: 'einkaufszettel2', component: Einkaufszettel2Component}, | |||||
{ path: '**', redirectTo: 'home'} | |||||
]; | |||||
@NgModule({ | |||||
imports: [RouterModule.forRoot(routes)], | |||||
exports: [RouterModule] | |||||
}) | |||||
export class AppRoutingModule { } |
<h1>Einkaufszettel1</h1> | |||||
<app-blog-create><app-blog-entry></app-blog-entry></app-blog-create> |
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
import { Einkaufszettel1Component } from './einkaufszettel1.component'; | |||||
describe('Einkaufszettel1Component', () => { | |||||
let component: Einkaufszettel1Component; | |||||
let fixture: ComponentFixture<Einkaufszettel1Component>; | |||||
beforeEach(async(() => { | |||||
TestBed.configureTestingModule({ | |||||
declarations: [ Einkaufszettel1Component ] | |||||
}) | |||||
.compileComponents(); | |||||
})); | |||||
beforeEach(() => { | |||||
fixture = TestBed.createComponent(Einkaufszettel1Component); | |||||
component = fixture.componentInstance; | |||||
fixture.detectChanges(); | |||||
}); | |||||
it('should create', () => { | |||||
expect(component).toBeTruthy(); | |||||
}); | |||||
}); |
import { Component, OnInit } from '@angular/core'; | |||||
@Component({ | |||||
selector: 'app-einkaufszettel1', | |||||
templateUrl: './einkaufszettel1.component.html', | |||||
styleUrls: ['./einkaufszettel1.component.css'] | |||||
}) | |||||
export class Einkaufszettel1Component implements OnInit { | |||||
constructor() { } | |||||
ngOnInit(): void { | |||||
} | |||||
} |