wip: New react container route for solo panels that supports both angular and react panels

This commit is contained in:
Torkel Ödegaard
2019-01-31 09:44:12 +01:00
parent aafd4a339a
commit 6a4777eafc
5 changed files with 122 additions and 6 deletions

View File

@@ -18,6 +18,8 @@ function WrapInProvider(store, Component, props) {
export function reactContainer(
$route,
$location,
$injector,
$rootScope,
contextSrv: ContextSrv
) {
return {
@@ -38,7 +40,11 @@ export function reactContainer(
component = component.default;
}
const props = { };
const props = {
$injector: $injector,
$rootScope: $rootScope,
$scope: scope,
};
ReactDOM.render(WrapInProvider(store, component, props), elem[0]);