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

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.
@@ -766,6 +766,7 @@
766
766
  var _this = _super.call(this, link, microClient, callParams, requestOptions) || this;
767
767
  _this.initialized = false;
768
768
  _this.serializeTo = LinkSerializer.AS_VALUE_IF_INITIALIZED;
769
+ _this.intervalId = null;
769
770
  if (initialized) {
770
771
  _this.set(initialValue);
771
772
  }
@@ -811,6 +812,44 @@
811
812
  }
812
813
  return this._getPromise;
813
814
  };
815
+ /**
816
+ * @param {?=} interval
817
+ * @return {?}
818
+ */
819
+ LinkField.prototype.refresh = /**
820
+ * @param {?=} interval
821
+ * @return {?}
822
+ */
823
+ function (interval) {
824
+ var _this = this;
825
+ if (interval) {
826
+ this.stopRefresh();
827
+ }
828
+ if (!this.isInitialized()) {
829
+ this.initWithObs();
830
+ }
831
+ if (interval) {
832
+ this.intervalId = setInterval((/**
833
+ * @return {?}
834
+ */
835
+ function () {
836
+ if (!_this.isInitialized()) {
837
+ _this.initWithObs().subscribe();
838
+ }
839
+ }), interval);
840
+ }
841
+ };
842
+ /**
843
+ * @return {?}
844
+ */
845
+ LinkField.prototype.stopRefresh = /**
846
+ * @return {?}
847
+ */
848
+ function () {
849
+ if (this.intervalId) {
850
+ clearInterval(this.intervalId);
851
+ }
852
+ };
814
853
  /**
815
854
  * @return {?}
816
855
  */
@@ -828,7 +867,7 @@
828
867
  * @return {?}
829
868
  */
830
869
  function () {
831
- _this.initWithObs(null, null);
870
+ _this.initWithObs(null, null).subscribe();
832
871
  return _this.valueSubj;
833
872
  }));
834
873
  }
@@ -1004,6 +1043,11 @@
1004
1043
  LinkField.prototype.valueSubj;
1005
1044
  /** @type {?} */
1006
1045
  LinkField.prototype.serializeTo;
1046
+ /**
1047
+ * @type {?}
1048
+ * @private
1049
+ */
1050
+ LinkField.prototype.intervalId;
1007
1051
  }
1008
1052
 
1009
1053
  /**