BETTERZON-41: Adding PDP Component

This commit is contained in:
Patrick Müller 2020-12-02 18:36:30 +01:00
parent 4100192f02
commit cbe8ad8f00
6 changed files with 46 additions and 2 deletions

View File

@ -6,12 +6,14 @@ import {AppComponent} from './app.component';
import {AppRouting} from './app.routing';
import {ProductListComponent} from './product-list/product-list.component';
import { LandingpageComponent } from './landingpage/landingpage.component';
import { ProductDetailPageComponent } from './product-detail-page/product-detail-page.component';
@NgModule({
declarations: [
AppComponent,
ProductListComponent,
LandingpageComponent
LandingpageComponent,
ProductDetailPageComponent
],
imports: [
BrowserModule,

View File

@ -4,10 +4,11 @@ import {RouterModule, Routes} from '@angular/router';
import {AppComponent} from './app.component';
import {ProductListComponent} from './product-list/product-list.component';
import {LandingpageComponent} from './landingpage/landingpage.component';
import {ProductDetailPageComponent} from './product-detail-page/product-detail-page.component';
const routes: Routes = [
{path: '', component: LandingpageComponent},
{path: 'pdp', component: ProductListComponent}
{path: 'product', component: ProductDetailPageComponent}
];
@NgModule({

View File

@ -0,0 +1 @@
<p>product-detail-page works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ProductDetailPageComponent } from './product-detail-page.component';
describe('ProductDetailPageComponent', () => {
let component: ProductDetailPageComponent;
let fixture: ComponentFixture<ProductDetailPageComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ProductDetailPageComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ProductDetailPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-product-detail-page',
templateUrl: './product-detail-page.component.html',
styleUrls: ['./product-detail-page.component.css']
})
export class ProductDetailPageComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}