Update library versions
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
@@ -1,64 +1,65 @@
|
||||
import {
|
||||
NgModule,
|
||||
Inject,
|
||||
APP_BOOTSTRAP_LISTENER,
|
||||
InjectionToken, Type,
|
||||
} from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppCommonModule, } from '@farmmaps/common';
|
||||
import { AppCommonMapModule} from '@farmmaps/common-map';
|
||||
|
||||
import {AppRootComponent} from './app.component';
|
||||
|
||||
import {StoreModule, Store} from '@ngrx/store';
|
||||
import {EffectsModule, EffectSources} from '@ngrx/effects';
|
||||
import { StoreRouterConnectingModule} from '@ngrx/router-store';
|
||||
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import { LogoComponent } from './logo/logo.component';
|
||||
import { MenuComponent } from './menu/menu.component';
|
||||
|
||||
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
|
||||
|
||||
export function bootstrapEffects(effects: Type<any>[], sources: EffectSources) {
|
||||
return () => {
|
||||
effects.forEach(effect => sources.addEffects(effect));
|
||||
};
|
||||
}
|
||||
|
||||
export function createInstances(...instances: any[]) {
|
||||
return instances;
|
||||
}
|
||||
|
||||
export function provideBootstrapEffects(effects: Type<any>[]) {
|
||||
return [
|
||||
effects,
|
||||
{provide: BOOTSTRAP_EFFECTS, deps: effects, useFactory: createInstances},
|
||||
{
|
||||
provide: APP_BOOTSTRAP_LISTENER,
|
||||
multi: true,
|
||||
useFactory: bootstrapEffects,
|
||||
deps: [[new Inject(BOOTSTRAP_EFFECTS)], EffectSources],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppRootComponent,
|
||||
LogoComponent,
|
||||
MenuComponent
|
||||
],
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
AppCommonModule.forRoot() ,
|
||||
AppCommonMapModule.forRoot(),
|
||||
BrowserModule,
|
||||
StoreModule.forRoot({}),
|
||||
EffectsModule.forRoot([])
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppRootComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
import {
|
||||
NgModule,
|
||||
Inject,
|
||||
APP_BOOTSTRAP_LISTENER,
|
||||
InjectionToken, Type,
|
||||
} from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppCommonModule,AppCommonServiceModule } from '@farmmaps/common';
|
||||
import { AppCommonMapModule} from '@farmmaps/common-map';
|
||||
|
||||
import {AppRootComponent} from './app.component';
|
||||
|
||||
import {StoreModule, Store} from '@ngrx/store';
|
||||
import {EffectsModule, EffectSources} from '@ngrx/effects';
|
||||
import { StoreRouterConnectingModule} from '@ngrx/router-store';
|
||||
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import { LogoComponent } from './logo/logo.component';
|
||||
import { MenuComponent } from './menu/menu.component';
|
||||
|
||||
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
|
||||
|
||||
export function bootstrapEffects(effects: Type<any>[], sources: EffectSources) {
|
||||
return () => {
|
||||
effects.forEach(effect => sources.addEffects(effect));
|
||||
};
|
||||
}
|
||||
|
||||
export function createInstances(...instances: any[]) {
|
||||
return instances;
|
||||
}
|
||||
|
||||
export function provideBootstrapEffects(effects: Type<any>[]) {
|
||||
return [
|
||||
effects,
|
||||
{provide: BOOTSTRAP_EFFECTS, deps: effects, useFactory: createInstances},
|
||||
{
|
||||
provide: APP_BOOTSTRAP_LISTENER,
|
||||
multi: true,
|
||||
useFactory: bootstrapEffects,
|
||||
deps: [[new Inject(BOOTSTRAP_EFFECTS)], EffectSources],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppRootComponent,
|
||||
LogoComponent,
|
||||
MenuComponent
|
||||
],
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
AppCommonModule,
|
||||
AppCommonServiceModule.forRoot(),
|
||||
AppCommonMapModule.forRoot(),
|
||||
BrowserModule,
|
||||
StoreModule.forRoot({}),
|
||||
EffectsModule.forRoot([])
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppRootComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
Reference in New Issue
Block a user