Bootstrap an Angular 2 app, side-by-side with an already loaded Angularjs app

Viewed 233

On a particular website, there is an Angularjs app that I don't control. It's loaded on the HTML when I open the page. Let's call it app 1 :

<body data-ng-app="app1">.....</body>

My chrome plugin inserts an Angular 2 app in the HTML of the websites I visit. Let's call it app 2. I normally insert it with this code :

$('body').append('<app-root id="app-root"></app-root>');
platformBrowserDynamic().bootstrapModule(AppModule);

But this doesn't work.

==> The problem is, the Angularjs "app 1" is located directly in the body. So how can I insert my Anglular 2 "app 2" in the HTML, side-by-side?

1 Answers
Related