From: Kai Moritz Date: Sat, 21 Dec 2019 11:18:09 +0000 (+0100) Subject: Product-Alerts aus Tutorial übernommen X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=603f40c6f8565d6d183d3e46451110d3b0add1e7;p=examples%2Fangular-tutorial Product-Alerts aus Tutorial übernommen --- 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 @@ + + +