mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
chore(packages): move the packages to root
This commit is contained in:
98
angular/src/module.ts
Normal file
98
angular/src/module.ts
Normal file
@ -0,0 +1,98 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
APP_INITIALIZER,
|
||||
CUSTOM_ELEMENTS_SCHEMA,
|
||||
ModuleWithProviders,
|
||||
NgModule
|
||||
} from '@angular/core';
|
||||
|
||||
import { BooleanValueAccessor } from './control-value-accessors/boolean-value-accessor';
|
||||
import { NumericValueAccessor } from './control-value-accessors/numeric-value-accesssor';
|
||||
import { RadioValueAccessor } from './control-value-accessors/radio-value-accessor';
|
||||
import { SelectValueAccessor } from './control-value-accessors/select-value-accessor';
|
||||
import { TextValueAccessor } from './control-value-accessors/text-value-accessor';
|
||||
|
||||
/* Navigation */
|
||||
import { IonNav } from './navigation/ion-nav';
|
||||
import { IonRouterOutlet } from './navigation/ion-router-outlet';
|
||||
import { IonTab } from './navigation/ion-tab';
|
||||
import { IonTabs } from './navigation/ion-tabs';
|
||||
|
||||
/* Directives */
|
||||
import { VirtualScroll } from './directives/virtual-scroll';
|
||||
import { VirtualItem } from './directives/virtual-item';
|
||||
import { VirtualHeader } from './directives/virtual-header';
|
||||
import { VirtualFooter } from './directives/virtual-footer';
|
||||
|
||||
/* Providers */
|
||||
import { ActionSheetController } from './providers/action-sheet-controller';
|
||||
import { AlertController } from './providers/alert-controller';
|
||||
import { Events, setupProvideEvents } from './providers/events';
|
||||
import { LoadingController } from './providers/loading-controller';
|
||||
import { MenuController } from './providers/menu-controller';
|
||||
import { ModalController } from './providers/modal-controller';
|
||||
import { Platform } from './providers/platform';
|
||||
import { PopoverController } from './providers/popover-controller';
|
||||
import { ToastController } from './providers/toast-controller';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
BooleanValueAccessor,
|
||||
IonNav,
|
||||
IonRouterOutlet,
|
||||
IonTab,
|
||||
IonTabs,
|
||||
NumericValueAccessor,
|
||||
RadioValueAccessor,
|
||||
SelectValueAccessor,
|
||||
TextValueAccessor,
|
||||
VirtualScroll,
|
||||
VirtualItem,
|
||||
VirtualHeader,
|
||||
VirtualFooter,
|
||||
],
|
||||
exports: [
|
||||
BooleanValueAccessor,
|
||||
IonNav,
|
||||
IonRouterOutlet,
|
||||
IonTab,
|
||||
IonTabs,
|
||||
NumericValueAccessor,
|
||||
RadioValueAccessor,
|
||||
SelectValueAccessor,
|
||||
TextValueAccessor,
|
||||
|
||||
VirtualScroll,
|
||||
VirtualItem,
|
||||
VirtualHeader,
|
||||
VirtualFooter
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
],
|
||||
providers: [
|
||||
ModalController,
|
||||
PopoverController
|
||||
],
|
||||
schemas: [
|
||||
CUSTOM_ELEMENTS_SCHEMA
|
||||
]
|
||||
})
|
||||
export class IonicAngularModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: IonicAngularModule,
|
||||
providers: [
|
||||
AlertController,
|
||||
ActionSheetController,
|
||||
Events,
|
||||
LoadingController,
|
||||
MenuController,
|
||||
Platform,
|
||||
ToastController,
|
||||
|
||||
{ provide: APP_INITIALIZER, useFactory: setupProvideEvents, multi: true },
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user