@wolkabout/commons 0.0.45 → 0.0.46

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.
@@ -65,7 +65,7 @@ import { MatTabsModule } from '@angular/material/tabs';
65
65
  import * as i32 from '@angular/cdk/drag-drop';
66
66
  import { DragDropModule } from '@angular/cdk/drag-drop';
67
67
  import * as i0 from '@angular/core';
68
- import { NgModule, InjectionToken, inject, Injectable, Injector, DOCUMENT, Inject, Input, Directive, forwardRef, HostListener, TemplateRef, PLATFORM_ID, Pipe, ViewChild, ContentChild, Optional, Self, Component, input, computed, untracked, signal, viewChild, afterNextRender, effect, output, afterRenderEffect, contentChild } from '@angular/core';
68
+ import { NgModule, InjectionToken, inject, Injectable, Injector, runInInjectionContext, DOCUMENT, Inject, Input, Directive, forwardRef, HostListener, TemplateRef, PLATFORM_ID, Pipe, ViewChild, ContentChild, Optional, Self, Component, input, computed, untracked, signal, viewChild, afterNextRender, effect, output, afterRenderEffect, contentChild } from '@angular/core';
69
69
  import { BehaviorSubject, catchError, of, switchMap, EMPTY, tap, filter, map, combineLatestWith, forkJoin, from, distinctUntilChanged, shareReplay, merge, Subject, takeUntil, combineLatest, take, first } from 'rxjs';
70
70
  import { jwtDecode } from 'jwt-decode';
71
71
  import { loadRemoteModule } from '@angular-architects/native-federation';
@@ -529,6 +529,7 @@ class FeatureRegistry {
529
529
  loadExternalFeatures(features) {
530
530
  if (!features || features.length === 0) {
531
531
  this.noExternalModules();
532
+ return;
532
533
  }
533
534
  forkJoin(features.map((feature) => from(loadRemoteModule(feature.remote, feature.feature)).pipe(map(module => module.default), catchError((error) => {
534
535
  console.warn("Unable to load: ", feature.remote + '/' + feature.feature, error);
@@ -545,7 +546,7 @@ class FeatureRegistry {
545
546
  registerFeature(feature) {
546
547
  this.loadedFeatures.push(feature);
547
548
  if (feature.init) {
548
- feature.init(this.injector);
549
+ runInInjectionContext(this.injector, feature.init);
549
550
  }
550
551
  console.info('Loaded feature: ', feature.name);
551
552
  }