@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.
- package/bundles/veloce-sdk-cms.umd.js +13 -2
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/cms/services/templates.service.d.ts +6 -1
- package/esm2015/cms/services/templates.service.js +15 -3
- package/fesm2015/veloce-sdk-cms.js +13 -2
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/package.json +1 -1
@@ -628,10 +628,21 @@
|
|
628
628
|
this.templates = {};
|
629
629
|
}
|
630
630
|
TemplatesService.prototype.register = function (name, templateRef) {
|
631
|
-
this.
|
631
|
+
this.ensureStorage(name);
|
632
|
+
this.templates[name].next(templateRef);
|
632
633
|
};
|
633
634
|
TemplatesService.prototype.get = function (name) {
|
634
|
-
|
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
|
}());
|