diff --git a/src/loading-bar.js b/src/loading-bar.js index 364ca82..bc17c6f 100644 --- a/src/loading-bar.js +++ b/src/loading-bar.js @@ -320,4 +320,16 @@ angular.module('cfp.loadingBar', []) }]; // }); // wtf javascript. srsly + /** + * Support Require.JS AMD Modules + * Check if define is a function then + * define AMD module + */ + + if(typeof define === 'function') { + define([], function(){ + return angular.module('chieffancypants.loadingBar'); + }); + } + })(); //