Top-Bar aus offiziellem Getting-Started Tutorial übernommen
authorKai Moritz <kai@juplo.de>
Fri, 20 Dec 2019 14:27:23 +0000 (15:27 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 20 Dec 2019 14:31:00 +0000 (15:31 +0100)
src/app/app.component.html
src/app/app.module.ts
src/app/top-bar/top-bar.component.css [new file with mode: 0644]
src/app/top-bar/top-bar.component.html [new file with mode: 0644]
src/app/top-bar/top-bar.component.spec.ts [new file with mode: 0644]
src/app/top-bar/top-bar.component.ts [new file with mode: 0644]

index a1c7110..e7d2b67 100644 (file)
@@ -1,3 +1,5 @@
+<app-top-bar></app-top-bar>
+
 <div class="container">
   <h3>Hallo Welt!</h3>
 </div>
index f657163..345cda3 100644 (file)
@@ -2,10 +2,12 @@ import { BrowserModule } from '@angular/platform-browser';
 import { NgModule } from '@angular/core';
 
 import { AppComponent } from './app.component';
+import { TopBarComponent } from './top-bar/top-bar.component';
 
 @NgModule({
   declarations: [
-    AppComponent
+    AppComponent,
+    TopBarComponent
   ],
   imports: [
     BrowserModule
diff --git a/src/app/top-bar/top-bar.component.css b/src/app/top-bar/top-bar.component.css
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/app/top-bar/top-bar.component.html b/src/app/top-bar/top-bar.component.html
new file mode 100644 (file)
index 0000000..d021aa7
--- /dev/null
@@ -0,0 +1,5 @@
+<a [routerLink]="['/']">
+  <h1>Peter Penis</h1>
+</a>
+
+<a [routerLink]="['/cart']" class="button fancy-button"><i class="material-icons">shopping_cart</i>Checkout</a>
diff --git a/src/app/top-bar/top-bar.component.spec.ts b/src/app/top-bar/top-bar.component.spec.ts
new file mode 100644 (file)
index 0000000..7629c73
--- /dev/null
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TopBarComponent } from './top-bar.component';
+
+describe('TopBarComponent', () => {
+  let component: TopBarComponent;
+  let fixture: ComponentFixture<TopBarComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ TopBarComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TopBarComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/top-bar/top-bar.component.ts b/src/app/top-bar/top-bar.component.ts
new file mode 100644 (file)
index 0000000..e531b08
--- /dev/null
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-top-bar',
+  templateUrl: './top-bar.component.html',
+  styleUrls: ['./top-bar.component.css']
+})
+export class TopBarComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}