@ngrx/core
Version:
Core operators and utiliies for the ngrx platform
31 lines • 1.2 kB
JavaScript
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
import { Subscriber } from 'rxjs/Subscriber';
export function leaveZone(zone) {
return this.lift(new LeaveZoneOperator(zone));
}
export var LeaveZoneOperator = (function () {
function LeaveZoneOperator(_zone) {
this._zone = _zone;
}
LeaveZoneOperator.prototype.call = function (subscriber, source) {
return source._subscribe(new LeaveZoneSubscriber(subscriber, this._zone));
};
return LeaveZoneOperator;
}());
var LeaveZoneSubscriber = (function (_super) {
__extends(LeaveZoneSubscriber, _super);
function LeaveZoneSubscriber(destination, _zone) {
_super.call(this, destination);
this._zone = _zone;
}
LeaveZoneSubscriber.prototype._next = function (value) {
var _this = this;
this._zone.runOutsideAngular(function () { return _this.destination.next(value); });
};
return LeaveZoneSubscriber;
}(Subscriber));
//# sourceMappingURL=leaveZone.js.map