Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
declarations: [
AppComponent,
LandingComponent,
Error404Component,
TestApiComponent,
UserJourneyComponent
],
imports: [
BrowserModule,
FormsModule,
DropdownModule,
HttpModule,
ToasterModule,
RouterModule.forRoot(routes),
NgIdleKeepaliveModule.forRoot(),
SharedModule,
],
providers: [
AuthenticationService,
CronParserService,
SharedService,
RouteGuard,
DataCacheService,
RequestService,
MessageService,
ConfigService,
UtilsService,
{
provide: APP_INITIALIZER,
useFactory: ConfigLoader,
deps: [ConfigService],
import { NgIdleModule } from "@ng-idle/core";
import { NgIdleKeepaliveModule } from "@ng-idle/keepalive";
import { from } from "rxjs";
import { starkSessionReducers } from "./reducers";
import { STARK_SESSION_CONFIG, StarkSessionConfig } from "./entities";
import { STARK_SESSION_SERVICE, StarkSessionServiceImpl } from "./services";
import { STARK_ROUTING_SERVICE, StarkRoutingService } from "../routing/services";
import { SESSION_STATES } from "./routes";
import { starkLoginStateName, starkPreloadingStateName } from "./constants";
import { StarkAppContainerComponent } from "./components";
@NgModule({
imports: [
CommonModule,
NgIdleModule.forRoot(),
NgIdleKeepaliveModule.forRoot(),
StoreModule.forFeature("StarkSession", starkSessionReducers),
UIRouterModule.forChild({
states: SESSION_STATES
})
],
declarations: [StarkAppContainerComponent],
exports: [StarkAppContainerComponent]
})
export class StarkSessionModule {
/**
* Instantiates the services only once since they should be singletons
* so the forRoot() should be called only by the AppModule
* @link https://angular.io/guide/singleton-services#forroot
* @param sessionConfig - Object containing the configuration (if any) for the Session service
* @returns a module with providers
*/
DragulaModule,
AuthModule,
EventsModule,
ScrollingModule,
SecurityGroupModule,
ServiceOfferingModule,
SettingsModule,
SnapshotModule,
VolumeModule,
SshKeysModule,
VmLogsModule,
TemplateModule,
VmModule,
AccountModule,
ResourceQuotasModule,
NgIdleKeepaliveModule.forRoot(),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient],
},
}),
],
declarations: [AppComponent, HomeComponent],
providers: [
{
provide: APP_INITIALIZER,
useFactory: InitAppFactory,
deps: [AuthService, HttpClient, TranslateService, Store],
multi: true,
},