In my Html I displayed two times "OUI" I think because I have two default installations (delestage, default command') how can I filter them one by one using ng-class and ng-repeat.
<div ng-repeat="value in installationsHelper" class="col-lg-6 col-md-6 col-sm-6 col-xs-6 text-left">
<div ng-repeat="value1 in value.InstallationDefautsTypes.value | filter : 'D'">{{value.InstallationDefautsTypes.value}}
<span ng-class="value1 ? 'mDefault' : 'mDanger'">
OUI
</span>
<script>
angular.module('myApp', []).controller('myController', function($scope) {
$scope.installationsStates = [
{
Installations: {
id: 1
},
InstallationsDefautsTypes : {
Delestage:
{
name: "Delestage",
value : false,
id: 1}
defaut command:
{
name: "Delestage",
value : false,
id: 1
}
}
},
defaultsInstallations: {
0:"defaut",
1:"Delestage"
}
},
{
Installations: {
id: 2
},
InstallationsDefautsTypes : {
Delestage:{
name: "Delestage",
value : false,
id: 1
}
});