Imagine I am working with an array like this:
(this data is fictitious, as I cannot share information from my client)
collections: {
browsers: [
{
label: 'Safari',
visitors: 45,
bounces: 20
},
{
label: 'Edge',
visitors: 25,
bounces: 12
},
{
label: 'Brave',
visitors: 40,
bounces: 18
},
{
label: 'Vivaldi',
visitors: 6,
bounces: 3
},
]
}
If I want to display data for Brave in my template, normally I would do something like this at the moment it's available:
<div ng-show="collections.browser.brave">content</div>
However, since it's an array, this method will not work.
Is there a way to use ng-show
effectively with the current object?