2018-01-23 14:29:00 +00:00
|
|
|
// (C) Copyright 2015 Martin Dougiamas
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { AddonFilesProvider } from './providers/files';
|
|
|
|
import { AddonFilesHelperProvider } from './providers/helper';
|
|
|
|
import { AddonFilesMainMenuHandler } from './providers/mainmenu-handler';
|
2018-03-01 15:55:49 +00:00
|
|
|
import { CoreMainMenuDelegate } from '@core/mainmenu/providers/delegate';
|
2018-01-23 14:29:00 +00:00
|
|
|
|
2018-06-01 11:47:02 +00:00
|
|
|
// List of providers (without handlers).
|
|
|
|
export const ADDON_FILES_PROVIDERS: any[] = [
|
|
|
|
AddonFilesProvider,
|
|
|
|
AddonFilesHelperProvider
|
|
|
|
];
|
|
|
|
|
2018-01-23 14:29:00 +00:00
|
|
|
@NgModule({
|
|
|
|
declarations: [
|
|
|
|
],
|
|
|
|
imports: [
|
|
|
|
],
|
2018-06-08 07:03:48 +00:00
|
|
|
providers: [
|
|
|
|
AddonFilesProvider,
|
|
|
|
AddonFilesHelperProvider,
|
2018-01-23 14:29:00 +00:00
|
|
|
AddonFilesMainMenuHandler
|
2018-06-08 07:03:48 +00:00
|
|
|
]
|
2018-01-23 14:29:00 +00:00
|
|
|
})
|
|
|
|
export class AddonFilesModule {
|
|
|
|
constructor(mainMenuDelegate: CoreMainMenuDelegate, filesHandler: AddonFilesMainMenuHandler) {
|
|
|
|
mainMenuDelegate.registerHandler(filesHandler);
|
|
|
|
}
|
|
|
|
}
|