Skip to content
Allows you to use 'multi-app' attribute to automatically bootstrap multiple Angular modules into the DOM
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
bower.json
multi-app.js

README.md

Angular multi-app

Angular multi-app allows you to use attributes to automatically bootstrap multiple Angular modules into the DOM. Much the same way that ng-app does, except without the restriction.

How Does It Work?

Install the bower package

bower install angular-multi-app

Then add the file at the bottom of your page after Angular

<script src="angular.js"></script>
<!-- more scripts -->
<script src="multi-app.js"></script>

Now just decorate the DOM elements you want to load your modules into

<div multi-app="module-one"></div>
<div multi-app="module-two"></div>
<div multi-app="module-three"></div>

Limitations

multi-app is only 12 lines of code. It isn't magic. It just calls angular.bootstrap for you automatically, so all the normal limitations of AngularJS apply.

Can I nest modules?

No. Angular won't let you do that.

Can I...

Did I mention that it just calls angular.bootstrap? Seriously, you should go RTFM.

You can’t perform that action at this time.