2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 import {BrowserModule} from '@angular/platform-browser';
22 import {NgModule, APP_INITIALIZER} from '@angular/core';
23 import {FormsModule} from '@angular/forms';
24 import {forwardRef} from '@angular/core';
25 import {AppComponent} from './app.component';
26 import {UpgradeAdapter} from '@angular/upgrade';
27 import {UpgradeModule} from '@angular/upgrade/static';
28 import {PropertiesAssignmentModule} from './pages/properties-assignment/properties-assignment.module';
30 DataTypesServiceProvider, SharingServiceProvider, CookieServiceProvider, StateServiceFactory,
31 StateParamsServiceFactory, CacheServiceProvider, EventListenerServiceProvider, ScopeServiceFactory,
32 NotificationServiceProvider
33 } from "./utils/ng1-upgraded-provider";
34 import {ConfigService} from "./services/config.service";
35 import {HttpModule} from '@angular/http';
36 import {HttpService} from './services/http.service';
37 import {AuthenticationService} from './services/authentication.service';
38 import {Cookie2Service} from "./services/cookie.service";
39 import {ComponentServiceNg2} from "./services/component-services/component.service";
40 import {ComponentServiceFactoryNg2} from "./services/component-services/component.service.factory";
41 import {ServiceServiceNg2} from "./services/component-services/service.service";
42 import {ComponentInstanceServiceNg2} from "./services/component-instance-services/component-instance.service";
43 import {ModalService} from "./services/modal.service";
44 import {UiElementsModule} from "./components/ui/ui-elements.module";
45 import {ConnectionWizardModule} from "./pages/connection-wizard/connection-wizard.module";
46 import {LayoutModule} from "./components/layout/layout.module";
47 import {UserService} from "./services/user.service";
48 import {PoliciesService} from "./services/policies.service";
49 import {DynamicComponentService} from "./services/dynamic-component.service";
50 import {SdcConfig} from "./config/sdc-config.config";
51 import { TranslateModule } from "./shared/translator/translate.module";
52 import { TranslationServiceConfig } from "./config/translation.service.config";
53 import {ServicePathCreatorModule} from './pages/service-path-creator/service-path-creator.module';
54 import {ServicePathsListModule} from './pages/service-paths-list/service-paths-list.module';
55 import {PluginFrameModule} from "./components/ui/plugin/plugin-frame.module";
56 import {PluginsService} from "./services/plugins.service";
57 import {EventBusService} from "./services/event-bus.service";
58 import {ServicePathModule} from 'app/ng2/components/logic/service-path/service-path.module';
59 import {ServicePathSelectorModule} from 'app/ng2/components/logic/service-path-selector/service-path-selector.module';
61 export const upgradeAdapter = new UpgradeAdapter(forwardRef(() => AppModule));
63 export function configServiceFactory(config:ConfigService) {
65 config.loadValidationConfiguration();
66 config.loadPluginsConfiguration();
84 //We need to import them here since we use them in angular1
85 ConnectionWizardModule,
86 PropertiesAssignmentModule,
88 ServicePathCreatorModule,
89 ServicePathsListModule,
91 ServicePathSelectorModule
96 DataTypesServiceProvider,
97 SharingServiceProvider,
98 CookieServiceProvider,
100 StateParamsServiceFactory,
102 CacheServiceProvider,
103 EventListenerServiceProvider,
104 NotificationServiceProvider,
105 AuthenticationService,
109 ComponentServiceFactoryNg2,
115 DynamicComponentService,
117 ComponentInstanceServiceNg2,
118 TranslationServiceConfig,
122 provide: APP_INITIALIZER,
123 useFactory: configServiceFactory,
124 deps: [ConfigService],
128 bootstrap: [AppComponent]
132 export class AppModule {
134 constructor(public upgrade:UpgradeModule, eventBusService:EventBusService) {