Closed
Description
Its pretty common to be able to pass an array or an object as an arg, but the pf-notification-drawer
will only accept an array:
scope.$watch('notificationGroups', function () {
var openFound = false;
// this line demands that notificationGroups be an array :(
scope.notificationGroups.forEach(function (group) {
if (group.open) {
if (openFound) {
group.open = false;
} else {
openFound = true;
}
}
});
});
Using a utility like angular.forEach
would provide some helpful flexibility & eliminate the need for glue code to swap objects and arrays back and forth.
Metadata
Metadata
Assignees
Labels
No labels