import { ModuleWithProviders , NgModule } from '@angular/core' ; import { BottomSheetService } from './bottomsheet.service' ; import { install } from '@nativescript-community/ui-material-bottomsheet' ; @ NgModule ( ) export class NativeScriptMaterialBottomSheetModule { private static initialized = false ; static forRoot ( ) { return { ngModule : NativeScriptMaterialBottomSheetModule , providers : [ BottomSheetService ] , } ; } public constructor ( ) { if ( ! NativeScriptMaterialBottomSheetModule . initialized ) { install ( ) ; NativeScriptMaterialBottomSheetModule . initialized = true ; } } }