I have an array like this:
export var EXPRESSIONCATALOG: ExpressionCatalogItem[] = [{
"selector" : "arrivalDate",
"selectorName": "Arrival date",
"constraints": ["GreaterThan", "LessThan", "Equals", "NotEquals"],
"valueType": "Date"
},
{
"selector": "departureDate",
"selectorName":"Departure Date",
"constraints": ["GreaterThan", "LessThan", "Equals", "NotEquals"],
"valueType": "Date",
},
and so on here is the html template:
<div class="container">
<div class="row" *ngFor="#expression of expressions;#expressionindex = index">
<div class="col-xs-3">
<select class="form-control" [ngModel]="expression.selectorName" >
<!--(ngModelChange)="onChange(expressionindex, $event)"-->
<option *ngFor="#c of catalog;#catalogindex = index" [value]="c.selectorName">
{{c.selectorName}}
</option>
</select>
</div>
<div class="col-xs-3">
<select class="form-control">
<option *ngFor="#constraint of catalog">
{{constraint.constraints}}
</option>
</select>
</div>
<!--<constraint></constraint>-->
</div>
<a class="btn btn-primary" (click)="newCondition()"><i class="glyphicon glyphicon-plus"></i></a>
</div>
How do i set that second select dynamically by the constraints given in the array? Now it shows all of them not matched by the first selector.