Within my HTML, I have the following angular code:
<div ng-controller="DocTableCtrl as docTableCtrl" ng-init='docTableCtrl.init()'>
{{docTableCtrl.skuArr.length > 0}}
<div class="table-wrapper" ng-if="docTableCtrl.skuArr.length > 0">
made it in
</div>
</div>
No instance of "opacity" exists within the docTableCtrl object, so the issue is not related to that.
The problem I am encountering is as follows. Despite
docTableCtrl.skuArr.length > 0
displaying true
, indicating that the ng-if should be showing the element, the style attribute in the DOM contains opacity: 0;
. I cannot determine where this is originating from. When I remove the ng-if
condition from the table-wrapper div, the opacity setting disappears and the content displays on the screen.
This perplexing situation suggests that somehow Angular is manipulating the div's opacity, although the reason for this behavior remains elusive.
What is causing the opacity to default to 0 only when the ng-if statement is applied to the table-wrapper
div?