update to use $timeout w/ invokeApply=false

This commit is contained in:
Adam Bradley
2014-08-05 11:31:06 -05:00
parent ae87c66b12
commit d85814b1e6

View File

@@ -34,8 +34,8 @@
*/
IonicModule
.factory('$ionicBackdrop', [
'$document',
function($document) {
'$document', '$timeout',
function($document, $timeout) {
var el = jqLite('<div class="backdrop">');
var backdropHolds = 0;
@@ -74,9 +74,9 @@ function($document) {
function release() {
if ( (--backdropHolds) === 0 ) {
el.removeClass('active');
setTimeout(function() {
$timeout(function() {
!backdropHolds && el.removeClass('visible');
}, 400);
}, 400, false);
}
}