V0.1j Routing + Navbar funktioniert. Zweiter Einkaufszettel angelegt
This commit is contained in:
parent
71a495e9b4
commit
bddfef8d37
19
src/app/app-routing.module.ts
Normal file
19
src/app/app-routing.module.ts
Normal file
@ -0,0 +1,19 @@
|
||||
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 { }
|
@ -0,0 +1,2 @@
|
||||
<h1>Einkaufszettel1</h1>
|
||||
<app-blog-create><app-blog-entry></app-blog-entry></app-blog-create>
|
@ -0,0 +1,25 @@
|
||||
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();
|
||||
});
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
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 {
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user