@wolkabout/commons 0.0.43 → 0.0.44
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.
|
@@ -534,17 +534,24 @@ class FeatureRegistry {
|
|
|
534
534
|
console.warn("Unable to load: ", feature.remote + '/' + feature.feature, error);
|
|
535
535
|
return of(null);
|
|
536
536
|
})))).subscribe((results) => {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
537
|
+
runInInjectionContext(this.injector, () => {
|
|
538
|
+
results.forEach((feature) => {
|
|
539
|
+
if (feature) {
|
|
540
|
+
this.initiateFeature(feature);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
541
543
|
});
|
|
542
544
|
this._features$.next([...this.loadedFeatures]);
|
|
543
545
|
});
|
|
544
546
|
}
|
|
545
547
|
registerFeature(feature) {
|
|
548
|
+
runInInjectionContext(this.injector, () => this.initiateFeature(feature));
|
|
549
|
+
}
|
|
550
|
+
initiateFeature(feature) {
|
|
546
551
|
this.loadedFeatures.push(feature);
|
|
547
|
-
|
|
552
|
+
if (feature.init) {
|
|
553
|
+
feature.init();
|
|
554
|
+
}
|
|
548
555
|
console.info('Loaded feature: ', feature.name);
|
|
549
556
|
}
|
|
550
557
|
get features$() {
|