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

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,40 @@
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
+ this.initWithObs();
829
+ if (interval) {
830
+ this.intervalId = setInterval((/**
831
+ * @return {?}
832
+ */
833
+ function () {
834
+ _this.initWithObs().subscribe();
835
+ }), interval);
836
+ }
837
+ };
838
+ /**
839
+ * @return {?}
840
+ */
841
+ LinkField.prototype.stopRefresh = /**
842
+ * @return {?}
843
+ */
844
+ function () {
845
+ if (this.intervalId) {
846
+ clearInterval(this.intervalId);
847
+ }
848
+ };
814
849
  /**
815
850
  * @return {?}
816
851
  */
@@ -828,7 +863,7 @@
828
863
  * @return {?}
829
864
  */
830
865
  function () {
831
- _this.initWithObs(null, null);
866
+ _this.initWithObs(null, null).subscribe();
832
867
  return _this.valueSubj;
833
868
  }));
834
869
  }
@@ -1004,6 +1039,11 @@
1004
1039
  LinkField.prototype.valueSubj;
1005
1040
  /** @type {?} */
1006
1041
  LinkField.prototype.serializeTo;
1042
+ /**
1043
+ * @type {?}
1044
+ * @private
1045
+ */
1046
+ LinkField.prototype.intervalId;
1007
1047
  }
1008
1048
 
1009
1049
  /**