From 603f40c6f8565d6d183d3e46451110d3b0add1e7 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 21 Dec 2019 12:18:09 +0100 Subject: [PATCH] =?utf8?q?Product-Alerts=20aus=20Tutorial=20=C3=BCbernomme?= =?utf8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/app/app.module.ts | 4 ++- .../product-alerts.component.css | 0 .../product-alerts.component.html | 3 +++ .../product-alerts.component.spec.ts | 25 +++++++++++++++++++ .../product-alerts.component.ts | 17 +++++++++++++ .../product-list/product-list.component.html | 3 +++ 6 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 src/app/product-alerts/product-alerts.component.css create mode 100644 src/app/product-alerts/product-alerts.component.html create mode 100644 src/app/product-alerts/product-alerts.component.spec.ts create mode 100644 src/app/product-alerts/product-alerts.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a20e2d0..2bc4940 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,13 +6,15 @@ import { AppComponent } from './app.component'; import { TopBarComponent } from './top-bar/top-bar.component'; import { ProductListComponent } from './product-list/product-list.component'; import { ProductDetailsComponent } from './product-details/product-details.component'; +import { ProductAlertsComponent } from './product-alerts/product-alerts.component'; @NgModule({ declarations: [ AppComponent, TopBarComponent, ProductListComponent, - ProductDetailsComponent + ProductDetailsComponent, + ProductAlertsComponent ], imports: [ BrowserModule, diff --git a/src/app/product-alerts/product-alerts.component.css b/src/app/product-alerts/product-alerts.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/product-alerts/product-alerts.component.html b/src/app/product-alerts/product-alerts.component.html new file mode 100644 index 0000000..7ed54e8 --- /dev/null +++ b/src/app/product-alerts/product-alerts.component.html @@ -0,0 +1,3 @@ +

+ +

diff --git a/src/app/product-alerts/product-alerts.component.spec.ts b/src/app/product-alerts/product-alerts.component.spec.ts new file mode 100644 index 0000000..cbed753 --- /dev/null +++ b/src/app/product-alerts/product-alerts.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProductAlertsComponent } from './product-alerts.component'; + +describe('ProductAlertsComponent', () => { + let component: ProductAlertsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ProductAlertsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProductAlertsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/product-alerts/product-alerts.component.ts b/src/app/product-alerts/product-alerts.component.ts new file mode 100644 index 0000000..2b27eae --- /dev/null +++ b/src/app/product-alerts/product-alerts.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'app-product-alerts', + templateUrl: './product-alerts.component.html', + styleUrls: ['./product-alerts.component.css'] +}) +export class ProductAlertsComponent implements OnInit { + + @Input() product; + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/product-list/product-list.component.html b/src/app/product-list/product-list.component.html index 91c9aea..68c054e 100644 --- a/src/app/product-list/product-list.component.html +++ b/src/app/product-list/product-list.component.html @@ -11,4 +11,7 @@ + + + -- 2.20.1