mirror of https://github.com/abpframework/abp.git
committed by
GitHub
6 changed files with 27 additions and 22 deletions
@ -1,11 +0,0 @@ |
|||||
import { Injector } from '@angular/core'; |
|
||||
import { NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap'; |
|
||||
|
|
||||
export function initDatepickerConfig(injector: Injector) { |
|
||||
const datepickerConfig = injector.get(NgbInputDatepickerConfig, null); |
|
||||
if (datepickerConfig) { |
|
||||
datepickerConfig.container = 'body'; |
|
||||
} |
|
||||
|
|
||||
return () => {}; |
|
||||
} |
|
||||
@ -1 +1,2 @@ |
|||||
|
export * from './ng-bootstrap-config.provider'; |
||||
export * from './route.provider'; |
export * from './route.provider'; |
||||
|
|||||
@ -0,0 +1,21 @@ |
|||||
|
import { APP_INITIALIZER } from '@angular/core'; |
||||
|
import { NgbInputDatepickerConfig, NgbTypeaheadConfig } from '@ng-bootstrap/ng-bootstrap'; |
||||
|
|
||||
|
export const NG_BOOTSTRAP_CONFIG_PROVIDERS = [ |
||||
|
{ |
||||
|
provide: APP_INITIALIZER, |
||||
|
useFactory: configureNgBootstrap, |
||||
|
deps: [NgbInputDatepickerConfig, NgbTypeaheadConfig], |
||||
|
multi: true, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export function configureNgBootstrap( |
||||
|
datepicker: NgbInputDatepickerConfig, |
||||
|
typeahead: NgbTypeaheadConfig, |
||||
|
) { |
||||
|
return () => { |
||||
|
datepicker.container = 'body'; |
||||
|
typeahead.container = 'body'; |
||||
|
}; |
||||
|
} |
||||
Loading…
Reference in new issue