()
| 4643 | } |
| 4644 | |
| 4645 | function asyncPromise() { |
| 4646 | // only serve one instance of a promise in order to save CPU cycles |
| 4647 | if (!currentDefer) { |
| 4648 | currentDefer = $$q.defer(); |
| 4649 | $$asyncCallback(function() { |
| 4650 | currentDefer.resolve(); |
| 4651 | currentDefer = null; |
| 4652 | }); |
| 4653 | } |
| 4654 | return currentDefer.promise; |
| 4655 | } |
| 4656 | |
| 4657 | function applyStyles(element, options) { |
| 4658 | if (angular.isObject(options)) { |