I'm trying to add a filter to a dropdown
<select class="form-control" [ngModel]="value" (ngModelChange)="onChange($event)">
<option selected value="0">{{ first_value }}</option>
<option *ngFor="let i of data" [value]="i.id">
{{i.city_name}}
</option>
</select>
How can I add a filter like *ngIf="city_country == 'US'"?
dataarray with that condition?city_country == 'US', if env.name == 'Y', I want to display onlycity_country == 'UK'.datafield, right? You can make this filtering operation in your component rather than doing it on the html. It doesn't matter where this filter is coming from. Your component.ts file still Frontend.