mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
refactor(components): convert components to separate modules
This commit is contained in:
33
src/components/alert/alert.module.ts
Normal file
33
src/components/alert/alert.module.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
|
||||
import { ButtonModule } from '../button/button.module';
|
||||
import { BackdropModule } from '../backdrop/backdrop.module';
|
||||
|
||||
import { AlertCmp } from './alert-component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BackdropModule,
|
||||
ButtonModule,
|
||||
CommonModule,
|
||||
FormsModule
|
||||
],
|
||||
declarations: [
|
||||
AlertCmp
|
||||
],
|
||||
exports: [
|
||||
AlertCmp
|
||||
],
|
||||
entryComponents: [
|
||||
AlertCmp
|
||||
]
|
||||
})
|
||||
export class AlertModule {
|
||||
public static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: AlertModule, providers: []
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user