Skip to content

Commit

Permalink
Improve app mountpoint, remove innerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Nov 26, 2019
1 parent 83f1bb4 commit 2ff88db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/legacy/core_plugins/kibana/public/discover/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export async function renderApp(moduleName: string, element: HTMLElement) {

function mountDiscoverApp(moduleName: string, element: HTMLElement) {
const mountpoint = document.createElement('div');
// eslint-disable-next-line
mountpoint.innerHTML = `<div ng-view></div>`;
const appWrapper = document.createElement('div');
appWrapper.setAttribute('ng-view', '');
mountpoint.appendChild(appWrapper);
// bootstrap angular into detached element and attach it later to
// make angular-within-angular possible
const $injector = angular.bootstrap(mountpoint, [moduleName]);
Expand Down

0 comments on commit 2ff88db

Please sign in to comment.