mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-05-04 18:57:59 +00:00
BETTERZON-42: Restructuring, creating necessary components, design of Product detail component
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<app-header></app-header>
|
||||
<app-product-list numberOfProducts="20" [showProductPicture]="true"></app-product-list>
|
||||
<app-footer></app-footer>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProductSearchPageComponent } from './product-search-page.component';
|
||||
|
||||
describe('ProductSearchPageComponent', () => {
|
||||
let component: ProductSearchPageComponent;
|
||||
let fixture: ComponentFixture<ProductSearchPageComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ProductSearchPageComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProductSearchPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-product-search-page',
|
||||
templateUrl: './product-search-page.component.html',
|
||||
styleUrls: ['./product-search-page.component.css']
|
||||
})
|
||||
export class ProductSearchPageComponent implements OnInit {
|
||||
searchTerm: string;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.searchTerm = this.route.snapshot.queryParamMap.get('q');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user