hello dears geek i have a problem with angular2: I'm developing an application in angular2
(menuComponent, menuView.html)
(listProductComponent, listProductView.html)
(detailProductComponent, detailProductView.html)
i have a button in the menuView.html for add new Product like this
<ul class="nav nav-tabs">
<li><a class="active" [routerLink]="['ListeProduct']">Product</a></li>
<li><a [routerLink]="['ListeArticle']">Articles</a></li>
<li><a [routerLink]="['ListeClients']">Clients</a></li>
</ul>
<button type="button" (click)="Add()" class="btn btn-primary ajouter">Add</button>`
my listProductView.html
is:
<table class="table table-striped">
<thead>
<tr>
<th>Code Product</th>
<th>Product Name</th>
<th>Cost</th>
</tr>
</thead>
<tr *ngFor="#product of products" >
<td>{{product.code}}</td>
<td>{{product.name}}</td>
<td>{{product.cost}}</td>
</tr>
</table> `
what I need is when I click on one product of the listProduct
to see the product detail in detailProductView.html
is to hide the button Add from menuView.html
.