Commit d80308fd authored by colemanw's avatar colemanw

Add angular util crmLoadScript

parent f62c1fa7
......@@ -346,4 +346,16 @@
};
});
angular.module('crmUtil').factory('crmLoadScript', function($q) {
return function(url) {
var deferred = $q.defer();
CRM.loadScript(url).done(function() {
deferred.resolve(true);
});
return deferred.promise;
};
});
})(angular, CRM.$, CRM._);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment