I have a message object which I want to display in a table, I don't want to display all properties of the message so I set some of them false and I want to filter the properties that are set true and display them
Message Object:
message0 = {
id: {
wert: 0,
status: pr_active.id
},
category: {
wert: 'General',
status: pr_active.category
},
icon_id: {
wert: '1',
status: pr_active.id.icon_id
},
text: {
wert: 'Success',
status: pr_active.id.text
}
};
scope.messages = [message0, message1, message2];
ngRepeat:
<tr ng-repeat="message in messages | filter: {category : category}">
<td ng-repeat="property in message | filter: {status:true}">
{{property.wert}}
</td>
</tr>
I'm using a status-Object which contains the status for every possible property, so that I can connect it to the header of the table
pr_active = {
id: 'false',
category: 'false',
icon_id: 'true',
text: 'true',
}
The problem is, that every property is displayed, even the one's that should be false.
Also the properties are displayed in the wrong order (they are ordered alphabetically), how can I use the default order that I defined