I have added multiple button elements using ng-repeat. Now I am looking to adjust the opacity of these buttons based on a boolean value in JavaScript before any click events occur, excluding ng-click.
Here is the HTML structure:
<div id="splash_btn_box_ng">
<button id="{{button.buttonId}}" ng-click="setMode(button)" ng-repeat="button in buttons"></button>
</div>
I attempted to set the opacity within init() as shown below:
$scope.buttons.buttonId.style.opacity = 0.3;
However, this resulted in an error indicating that the button was not created at the time when I tried to adjust the opacity property. Due to this issue, setting opacity within init() was unsuccessful:
TypeError: Cannot set property 'opacity' of undefined