Posts

Showing posts with the label Javascript

Multiple ngApp in 1 page or 1 application

I encounter this issue where there are 2 applications which is totally handled by different ngApp but they want to put them as a same application. After a quick search online, found that actually we can bootstrap the page with different ngApp manually instead of by defining ngApp at body tag. See below sample source for example HTML <!doctype html> <html>     <head>         <meta charset="utf-8">         <title>AngularJS Plunker</title>         <script>document.write('<base href="' + document.location + '" />');</script>         <link rel="stylesheet" href="style.css">          </head>     <body ng-app="HelloWorldApp">         Test 1         <section id="helloworld" ng-controller="HelloWorldController">     ...