Commit 5add225b 5add225b82ac59de10db4d4e1688ea4ea5a34901 by Vincent Peybernes

#11 Error on importing in browser - fix angular definition

1 parent 1e17942a
Pipeline #38 for 5add225b passed in 24 seconds
......@@ -8,7 +8,7 @@
if(typeof global != 'undefined' && typeof module != 'undefined' && module.exports) return module.exports = definition();
//Browser export
if(typeof window != 'undefined'){
if(typeof angular != 'undefined' && angular.version.major == 1) return angular.module('relative-placement-js').factory('RelativePlacement', definition);
if(typeof angular != 'undefined' && angular.version.major == 1) return angular.module('relative-placement-js', []).factory('RelativePlacement', definition);
if(typeof requirejs != 'undefined') return define(definition());
window.RelativePlacement = definition();
......