Home Selectively use dependent modules in AngularJS
Reply: 0

Selectively use dependent modules in AngularJS

user525
1#
user525 Published in July 19, 2018, 3:28 pm

I'm writing a small application where I have all AngularJS code inside of one file. This file is included in every HTML page. How would I filter which dependent modules are needed for specific HTML page? I.e. if I have e.g.:

var app = angular.module('MyApp', ['ngTouch', 'ngMessages']);

but I only need ngTouch on some pages and on the other pages only ngMessages, how would I prevent loading the other, unnecessary dependent module for each page?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.371569 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO