2
I’ll give you an example just for testing:
In this example when I put filter:chart.id='1'
, in addition to it returning me id 1 it returns me id 10, as I would return only id=1?
function TodoCtrl($scope) {
$scope.chartList = [
{ "id" : 1, "name" : "chart 1", "order" : 1, "active" : false },
{ "id" : 2, "name" : "chart 2", "order" : 2, "active" : false },
{ "id" : 3, "name" : "chart 3", "order" : 3, "active" : true },
{ "id" : 4, "name" : "chart 4", "order" : 4, "active" : true },
{ "id" : 10, "name" : "chart 10", "order" : 5, "active" : true }
];
}
.done-true {
text-decoration: line-through;
color: grey;
}
<div ng-app>
<div ng-controller="TodoCtrl">
<select ng-model="toAddChart" ng-options="chart.id as chart.name for chart in chartList | filter:chart.id='1'">
<option value=""></option>
</select>
</div>
</div>
That’s why I like the Reactjs...
– Miguel Angelo