@veloceapps/sdk 4.0.11 → 4.0.12

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.
@@ -628,10 +628,21 @@
628
628
  this.templates = {};
629
629
  }
630
630
  TemplatesService.prototype.register = function (name, templateRef) {
631
- this.templates[name] = templateRef;
631
+ this.ensureStorage(name);
632
+ this.templates[name].next(templateRef);
632
633
  };
633
634
  TemplatesService.prototype.get = function (name) {
634
- return this.templates[name];
635
+ this.ensureStorage(name);
636
+ return this.templates[name].value;
637
+ };
638
+ TemplatesService.prototype.get$ = function (name) {
639
+ this.ensureStorage(name);
640
+ return this.templates[name].asObservable();
641
+ };
642
+ TemplatesService.prototype.ensureStorage = function (name) {
643
+ if (!this.templates[name]) {
644
+ this.templates[name] = new rxjs.BehaviorSubject(undefined);
645
+ }
635
646
  };
636
647
  return TemplatesService;
637
648
  }());