mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
extensions: tree-shakable services
This commit is contained in:
parent
a35526c225
commit
018b08cce7
@ -15,28 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { ExtensionLoaderService } from './services/extension-loader.service';
|
||||
import { ExtensionService } from './services/extension.service';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { DynamicExtensionComponent } from './components/dynamic-component/dynamic.component';
|
||||
import { DynamicTabComponent } from './components/dynamic-tab/dynamic-tab.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [DynamicExtensionComponent, DynamicTabComponent],
|
||||
exports: [DynamicExtensionComponent, DynamicTabComponent]
|
||||
})
|
||||
export class ExtensionsModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: ExtensionsModule,
|
||||
providers: [ExtensionLoaderService, ExtensionService]
|
||||
};
|
||||
}
|
||||
|
||||
static forChild(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: ExtensionsModule
|
||||
};
|
||||
}
|
||||
}
|
||||
export class ExtensionsModule {}
|
||||
|
@ -23,7 +23,9 @@ import { RouteRef } from '../config/routing.extensions';
|
||||
import { ActionRef } from '../config/action.extensions';
|
||||
import * as core from '../evaluators/core.evaluators';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExtensionService {
|
||||
configPath = 'assets/app.extensions.json';
|
||||
pluginsPath = 'assets/plugins';
|
||||
|
Loading…
x
Reference in New Issue
Block a user