is there any way to this like we do in php $x = 1 then if($a == $b) { $x++; } echo $x; how we can do this in angular i do not have any idea about this can someone help to solve out this problem
<ul *ngIf="contractMilestone" class="nav nav-tabs">
<li *ngFor="let mile of contractMilestone;let i=index;">
<a class="milstone-version {{i ==0 ? 'active':''}}" data-toggle="tab" href="#home{{i}}">{{i+1}}. New Milestone</a>
<div *ngFor="let deliver of contractDlieverable; let d=index;">
<a class="deliver-version" data-toggle="tab" *ngIf="mile.contract_milestone_id === deliver.milestone_id" href="#home{{i}}">{{i+1}}.{{d+1}} New Deliverable</a>
</div>
<a (click)="adddeliverable(mile.contract_milestone_id)" class="addDeliverable">Add New Deliverable</a>
</li>
this give me some thing like this
but i want the output like this
1. new milestone
1.1 new deliverable
1.2 new deliverable
2. new milesone
2.1 new deliverable
2.2 new deliverable
` element, not the `
`. This problem has a pure HTML+CSS solution. https://stackoverflow.com/questions/4098195/can-ordered-list-produce-result-that-looks-like-1-1-1-2-1-3-instead-of-just-1
– mbojko Feb 04 '20 at 12:33