Open jogjayr opened 8 years ago
Steps to repro:
Open a modal using the code below -
$modal.open({ templateUrl: '<some_url>', backdrop: 'static', windowClass: 'myCustomModalContainerClass' }).opened.then(function() { angular.element('.reveal-modal-bg').addClass('myCustomModalBg'); });
Expected:
angular.element('.reveal-modal-bg')
Actual:
angular.element('.reveal-modal-bg') === []
I expected the same issue, circumvent it by wrapping angular.element('.reveal-modal-bg').addClass('myCustomModalBg'); into setTimeout( ... , 0)
angular.element('.reveal-modal-bg').addClass('myCustomModalBg');
setTimeout( ... , 0)
Steps to repro:
Open a modal using the code below -
Expected:
angular.element('.reveal-modal-bg')
should refer to the modal bgActual:
angular.element('.reveal-modal-bg') === []