0

I've a webpage index.html which displays initially (when loaded by the client) a custom content. But at some point in the lifecycle of this page I want to load AngularJs.

So I tried to load angular.min.js and the controllers.js after another and inserted the HTML of the Angular page into the existing webpage. But it does not run. By now I've tried several ways without succes.

So my question is: can AngularJs be loaded after the page is already created and onload was alread fired?

mythbu
  • 786
  • 1
  • 7
  • 20
  • why wouldn't you just load Angular form the outset? I'm guessing your trying to work around a problem which makes me think this is an [XY Problem](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) – Liam Oct 23 '17 at 15:11
  • 1
    Angular has an automatic bootstrapping mechanism. I would guess that when you load up, you're using that instead of the manual bootstrapping. – theGleep Oct 23 '17 at 15:12
  • Which version of Angular are you using? – theGleep Oct 23 '17 at 15:12
  • 1
    You have to manually bootstrap it. Need a lot more details if you want more help – charlietfl Oct 23 '17 at 15:13
  • 1
    Possible duplicate of [Dynamically load JS inside JS](https://stackoverflow.com/questions/14521108/dynamically-load-js-inside-js) – Liam Oct 23 '17 at 15:13

0 Answers0