@micropermit/client-angular 0.2.8 → 0.2.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -814,15 +814,33 @@
814
814
  /**
815
815
  * @return {?}
816
816
  */
817
- LinkField.prototype.getObs = /**
817
+ LinkField.prototype.listenObs = /**
818
818
  * @return {?}
819
819
  */
820
820
  function () {
821
- if (!this._getObs) {
822
- this._getObs = this.initWithObs(null, null).pipe(operators.shareReplay(1));
823
- this._getPromise = null;
821
+ var _this = this;
822
+ if (this.valueSubj) {
823
+ return this.valueSubj;
824
824
  }
825
- return this._getObs;
825
+ else {
826
+ this.valueSubj = new rxjs.ReplaySubject(1);
827
+ return rxjs.defer((/**
828
+ * @return {?}
829
+ */
830
+ function () {
831
+ _this.initWithObs(null, null);
832
+ return _this.valueSubj;
833
+ }));
834
+ }
835
+ };
836
+ /**
837
+ * @return {?}
838
+ */
839
+ LinkField.prototype.getObs = /**
840
+ * @return {?}
841
+ */
842
+ function () {
843
+ return this.listenObs().pipe(operators.take(1));
826
844
  };
827
845
  /**
828
846
  * @param {?} value
@@ -837,7 +855,10 @@
837
855
  var oldValue = this.value;
838
856
  this.value = value;
839
857
  this.initialized = true;
840
- this._getObs = rxjs.of(this.value).pipe(operators.shareReplay(1));
858
+ if (!this.valueSubj) {
859
+ this.valueSubj = new rxjs.ReplaySubject(1);
860
+ }
861
+ this.valueSubj.next(value);
841
862
  this._getPromise = null;
842
863
  return oldValue;
843
864
  };
@@ -859,7 +880,7 @@
859
880
  function () {
860
881
  this.value = null;
861
882
  this.initialized = false;
862
- this._getObs = null;
883
+ this.valueSubj = null;
863
884
  this._getPromise = null;
864
885
  };
865
886
  /**
@@ -975,12 +996,12 @@
975
996
  * @type {?}
976
997
  * @private
977
998
  */
978
- LinkField.prototype._getObs;
999
+ LinkField.prototype._getPromise;
979
1000
  /**
980
1001
  * @type {?}
981
1002
  * @private
982
1003
  */
983
- LinkField.prototype._getPromise;
1004
+ LinkField.prototype.valueSubj;
984
1005
  /** @type {?} */
985
1006
  LinkField.prototype.serializeTo;
986
1007
  }
@@ -1588,7 +1609,7 @@
1588
1609
  * @return {?}
1589
1610
  */
1590
1611
  function (val) {
1591
- return (/** @type {?} */ (MicroObject.fromObject(val, _this)));
1612
+ return MicroObject.fromObject(val, _this);
1592
1613
  })), this.catchAndHandleError());
1593
1614
  return httpObs;
1594
1615
  };