Added config provider to be able to access config easily from react components

This commit is contained in:
Dominik Prokop
2019-01-18 09:50:29 +01:00
parent 33fa40a1f3
commit 4b9e933691
2 changed files with 30 additions and 1 deletions

View File

@@ -1,10 +1,11 @@
import coreModule from 'app/core/core_module';
import { provideConfig } from 'app/core/utils/ConfigProvider';
export function react2AngularDirective(name: string, component: any, options: any) {
coreModule.directive(name, [
'reactDirective',
reactDirective => {
return reactDirective(component, options);
return reactDirective(provideConfig(component), options);
},
]);
}