So what's going is that I have a list of orders which I show in a view. When I click on the order id for a specific order in the list I want to have it expand with more detailed information about the order. I've created a order view which I want to load in the div that expands but I was thinking the smart way to do this is to have a function creating a div when the order id is clicked. This is the template for the component:
<div class ="order" *ngFor="let order of orders | paginate: {itemsPerPage: 20, currentPage: pageNumber, totalItems: totalNumberOfOrders}">
<span class="orderOrderId">{{order.orderId}}</span>
</div>
Basically I want (click)="loadOrderView(order.orderId)" and then the function should do:
loadOrderView(orderId): {
"Create a div and load it in my html under the specified order"
}
I don't want to use bootstrap, this should be easy enough but I don't really know how to proceed. What is the best and easiest way to achieve what I want, which in the end is basically for the order to expand and more information be presented.
*ngIf<div class="order" *ngFor="....; let i=index"><order-detail *ngIf="expanded[i]"></order-detail></div>.<order-detail...?