javascript - How can I inject a library to my Angular 1.5 App only when I load a certain page (view, controller)? -


my library quite big , i'm looking ways load when needed.

use mechanism named $oclazyloadprovider example here:

$oclazyloadprovider.config({     'debug': true, // debugging 'true/false'     'events': true, // event 'true/false'     'modules': [{ // set modules         name : 'state1', // state1 module         files: ['app/components/state1/state1module.js']     },{         name : 'state2', // state2 module         files: ['app/components/state2/state2module.js']     }] }); 

using can simple load these javascript libraries need. can load javascript files, css files.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -