File tree 2 files changed +42
-2
lines changed
ADF_1.7.0/upgrade-from-1-6/app
2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { NgModule } from '@angular/core';
20
20
import { BrowserModule } from '@angular/platform-browser' ;
21
21
import { Editor3DModule } from 'ng2-3d-editor' ;
22
22
23
- import { CoreModule } from 'ng2-alfresco-core' ;
23
+ import { AppConfigService , CoreModule } from 'ng2-alfresco-core' ;
24
24
import { DataTableModule } from 'ng2-alfresco-datatable' ;
25
25
26
26
import { SearchModule } from 'ng2-alfresco-search' ;
@@ -41,6 +41,7 @@ import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
41
41
import { ViewerModule } from 'ng2-alfresco-viewer' ;
42
42
import { AppComponent } from './app.component' ;
43
43
import { routing } from './app.routes' ;
44
+ import { DebugAppConfigService } from './services/debug-app-config.service' ;
44
45
45
46
import {
46
47
HomeComponent ,
@@ -105,7 +106,9 @@ if (process.env.ENV === 'production') {
105
106
SettingComponent ,
106
107
FormDemoComponent
107
108
] ,
108
- providers : [ ] ,
109
+ providers : [
110
+ { provide : AppConfigService , useClass : DebugAppConfigService }
111
+ ] ,
109
112
bootstrap : [ AppComponent ]
110
113
111
114
, entryComponents : [
Original file line number Diff line number Diff line change
1
+ /*!
2
+ * @license
3
+ * Copyright 2016 Alfresco Software, Ltd.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import { Injectable } from '@angular/core' ;
19
+ import { Http } from '@angular/http' ;
20
+ import { AppConfigService , StorageService } from 'ng2-alfresco-core' ;
21
+
22
+ @Injectable ( )
23
+ export class DebugAppConfigService extends AppConfigService {
24
+
25
+ constructor ( private storage : StorageService , http : Http ) {
26
+ super ( http ) ;
27
+ }
28
+
29
+ /** @override */
30
+ get < T > ( key : string ) : T {
31
+ if ( key === 'ecmHost' || key === 'bpmHost' ) {
32
+ return < T > ( < any > this . storage . getItem ( key ) || super . get < T > ( key ) ) ;
33
+ }
34
+ return super . get < T > ( key ) ;
35
+ }
36
+
37
+ }
You can’t perform that action at this time.
0 commit comments