Cross Cross - 3 months ago 24
AngularJS Question

ionic.bundle.js break down into separate imports

We are gradually rewriting mobile html5 with Angular.js into Ionic framework. So we have got dozens of functions calling angular.js directly.

Ionic provides a bundle, which combined angular and ionic. We don't want use this bundled one.

As the Ionic CDN docs stated,, we can break down the bundle into separated files.

But no luck to get this work. I tried this on Ionic codepen demos,

i.e. I replaced

<script src="//"></script>

by using:

<script src="//"></script>

<script src="//"></script>

how to fix it? thanks.



<script src="lib/ionic/js/ionic.bundle.js"></script>


<script src="lib/angular/angular.js"></script>
<script src="lib/angular-animate/angular-animate.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
<script src="lib/angular-ui-router/release/angular-ui-router.js"></script>
<script src="lib/ionic/js/ionic.js"></script>
<script src="lib/ionic/js/ionic-angular.js"></script>

The order is important. You need all of those libraries, so add them if necessary.