dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AppModule cluster_AppModule_declarations cluster_AppModule_imports cluster_AppModule_bootstrap cluster_AppModule_providers decelerations decelerations AppModule AppModule decelerations->AppModule AppComponent AppComponent AppModule->AppComponent BrowserModule BrowserModule BrowserModule->AppModule FormsModule FormsModule FormsModule->AppModule BrowserAnimationsModule BrowserAnimationsModule BrowserAnimationsModule->AppModule ReactiveFormsModule ReactiveFormsModule ReactiveFormsModule->AppModule Ng2Bs3ModalModule Ng2Bs3ModalModule Ng2Bs3ModalModule->AppModule HttpModule HttpModule HttpModule->AppModule ChartModule ChartModule ChartModule->AppModule StoreModule.provideStore(args) StoreModule.provideStore(args) StoreModule.provideStore(args)->AppModule EffectsModule.run(args) EffectsModule.run(args) EffectsModule.run(args)->AppModule EffectsModule.run(args)->AppModule StoreDevtoolsModule.instrumentStore(args) StoreDevtoolsModule.instrumentStore(args) StoreDevtoolsModule.instrumentStore(args)->AppModule AgmCoreModule.forRoot(args) AgmCoreModule.forRoot(args) AgmCoreModule.forRoot(args)->AppModule SimpleGridModule.forRoot() SimpleGridModule.forRoot() SimpleGridModule.forRoot()->AppModule SharedModule.forRoot() SharedModule.forRoot() SharedModule.forRoot()->AppModule ToastModule.forRoot(args) ToastModule.forRoot(args) ToastModule.forRoot(args)->AppModule AlertModule.forRoot() AlertModule.forRoot() AlertModule.forRoot()->AppModule MsLibModule.forRoot(args) MsLibModule.forRoot(args) MsLibModule.forRoot(args)->AppModule ModalModule.forRoot() ModalModule.forRoot() ModalModule.forRoot()->AppModule DropdownModule DropdownModule DropdownModule->AppModule AccordionModule.forRoot() AccordionModule.forRoot() AccordionModule.forRoot()->AppModule JsonpModule JsonpModule JsonpModule->AppModule TreeModule TreeModule TreeModule->AppModule InputTextModule InputTextModule InputTextModule->AppModule InputTextModule->AppModule SelectButtonModule SelectButtonModule SelectButtonModule->AppModule DropdownModulePrime DropdownModulePrime DropdownModulePrime->AppModule routing routing routing->AppModule providing providing providing->AppModule

File

src/app/app-module.ts

Declarations

Imports

Bootstrap

import {BrowserModule} from "@angular/platform-browser";
import {Compiler, NgModule, ErrorHandler} from "@angular/core";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {HttpModule, JsonpModule} from "@angular/http";
import {Ng2Bs3ModalModule} from "ng2-bs3-modal/ng2-bs3-modal";
import {AppComponent} from "./app-component";
import {LocalStorage} from "../services/LocalStorage";
import {RedPepperService} from "../services/redpepper.service";
import {YellowPepperService} from "../services/yellowpepper.service";
import {MsLibModule} from "ng-mslib/dist/mslib.module";
import {ToastModule} from "ng2-toastr";
import {AccordionModule, AlertModule, ModalModule} from "ngx-bootstrap";
import {DropdownModule, DropdownModule as DropdownModulePrime, InputTextModule, SelectButtonModule, TreeModule} from "primeng/primeng";
import {routing} from "../app-routes";
import {LoginPanel} from "../comps/entry/LoginPanel";
import {Logout} from "../comps/logout/Logout";
import {AgmCoreModule} from "angular2-google-maps/core";
import {ImgLoader} from "../comps/imgloader/ImgLoader";
import {ChartModule} from "angular2-highcharts";
import {CommBroker} from "../services/CommBroker";
import {AUTH_PROVIDERS} from "../services/AuthService";
import {StoreService} from "../services/StoreService";
import {NgMenu} from "../comps/ng-menu/ng-menu";
import {NgMenuItem} from "../comps/ng-menu/ng-menu-item";
import {AutoLogin} from "../comps/entry/AutoLogin";
import {StoreModule} from "@ngrx/store";
import {INITIAL_APPLICATION_STATE} from "../store/application.state";
import {EffectsModule} from "@ngrx/effects";
import {StoreDevtoolsModule} from "@ngrx/store-devtools";
import {ACTION_LIVELOG_UPDATE, AppdbAction} from "../store/actions/appdb.actions";
import {AppDbEffects} from "../store/effects/appdb.effects";
import {MsdbEffects} from "../store/effects/msdb.effects";
import {environment} from "../environments/environment";
import {productionReducer} from "../store/store.data";
import {NgmslibService} from "ng-mslib";
import {SharedModule} from "../modules/shared.module";
import {Dashboard} from "./dashboard/dashboard-navigation";
import {Appwrap} from "./appwrap";
import "hammerjs";
import "gsap";
import "gsap/CSSPlugin";
import "gsap/Draggable";
import "gsap/TweenLite";
import "gsap/ScrollToPlugin";
import {Lib} from "../Lib";
import {FontLoaderService} from "../services/font-loader-service";
import {SimpleGridModule} from "../comps/simple-grid-module/SimpleGridModule";
import {GlobalErrorHandler} from "../services/global-error-handler";
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {FasterqTerminal} from "./fasterq/fasterq-terminal";
import {WizardService} from "../services/wizard-service";
import {ResellerLogo} from "../comps/logo/reseller-logo";
import {DashPanel} from "./dashboard/dash-panel";
import {ServerAvg} from "./dashboard/server-avg";
import {StorageUsed} from "./dashboard/storage-used";
import {LiveLogModel} from "../models/live-log-model";

// import "fabric"; // need to remove if we import via cli
// import {ScreenTemplate} from "../comps/screen-template/screen-template";

declare global {
    interface JQueryStatic {
        base64: any;
        knob: any;
        gradientPicker: any;
        timepicker: any;
        contextmenu: any;
        index: any;
    }
}

export const providing = [CommBroker, WizardService, AUTH_PROVIDERS, RedPepperService, YellowPepperService, LocalStorage, StoreService, FontLoaderService, AppdbAction, {
    provide: "OFFLINE_ENV",
    useValue: window['offlineDevMode']
},
    {
        provide: "HYBRID_PRIVATE",
        useValue: false
    },
    {
        provide: ErrorHandler,
        useClass: GlobalErrorHandler
    }
];

const decelerations = [AppComponent, AutoLogin, LoginPanel, Appwrap, Dashboard, Logout, NgMenu, NgMenuItem, ImgLoader, FasterqTerminal, DashPanel, ServerAvg, StorageUsed];

export function appReducer(state: any = INITIAL_APPLICATION_STATE, action: any) {
    if (environment.production) {
        return productionReducer(state, action);
    } else {
        return productionReducer(state, action);
        // return developmentReducer(state, action);
    }
}

@NgModule({
    declarations: [decelerations],
    imports: [
        BrowserModule,
        FormsModule,
        BrowserAnimationsModule,
        ReactiveFormsModule,
        Ng2Bs3ModalModule,
        HttpModule,
        ChartModule,
        StoreModule.provideStore(appReducer),
        EffectsModule.run(AppDbEffects),
        EffectsModule.run(MsdbEffects),
        StoreDevtoolsModule.instrumentStore({maxAge: 2}),
        // StoreDevtoolsModule.instrumentOnlyWithExtension(),
        AgmCoreModule.forRoot({
            apiKey: 'AIzaSyDKa8Z3QLtACfSfxF-S8A44gm5bkvNTmuM',
            libraries: ['places']
        }),
        SimpleGridModule.forRoot(),
        SharedModule.forRoot(),
        ToastModule.forRoot({
            animate: 'flyRight',
            positionClass: 'toast-bottom-right',
            toastLife: 10000,
            showCloseButton: true,
            maxShown: 5,
            newestOnTop: true,
            enableHTML: true,
            dismiss: 'auto',
            messageClass: "",
            titleClass: ""
        }),
        AlertModule.forRoot(),
        MsLibModule.forRoot({a: 1}),
        ModalModule.forRoot(),
        DropdownModule,
        AccordionModule.forRoot(),
        JsonpModule,
        TreeModule,
        InputTextModule,
        SelectButtonModule,
        InputTextModule,
        DropdownModulePrime,
        routing,
    ],
    providers: [providing],
    bootstrap: [AppComponent]
})

export class AppModule {
    constructor(private commBroker: CommBroker, private compiler: Compiler, private ngmslibService: NgmslibService, private yp: YellowPepperService, private fontLoaderService: FontLoaderService) {
        Lib.Con(`running in dev mode: ${Lib.DevMode()}`);
        Lib.Con(`App in ${(compiler instanceof Compiler) ? 'AOT' : 'JIT'} mode`);
        window['business_id'] = -1;
        window['jQueryAny'] = jQuery;
        window['jXML'] = jQuery;
        this.ngmslibService.globalizeStringJS();
        Lib.Con(StringJS('app-loaded-and-ready').humanize().s);
        Lib.AlertOnLeave();
        this.yp.dispatch(({type: ACTION_LIVELOG_UPDATE, payload: new LiveLogModel({event: 'app started'})}));
    }
}

results matching ""

    No results matching ""