Answers for "(click)="onProductSelect(item.id)""

0

(click)="onProductSelect(item.id)"

Dynamic Page

1) (click)="onProductSelect(item.id)"  for html

2)  onProductSelect(id){
    this.nav.navigateForward('productlist/' + id);    for ts
    console.log('id of category',id);
  }

3). path: 'productlist/:id', for app routing


4)  this.id = this.activatedRoute.snapshot.paramMap.get('id');  dynamic page
 this.apiService.getItem(this.id).subscribe(response => {        ts ngoninit
      console.log('product response 1', response);
      this.products = response;
      console.log('product repsonse 2', this.products)
    })
Posted by: Guest on January-19-2021

Code answers related to "(click)="onProductSelect(item.id)""

Code answers related to "Javascript"

Browse Popular Code Answers by Language