Commit 8c4e6fe4 8c4e6fe4c3ff78057df1a9e779095b98a78309ab by Vincent Peybernes

#11 Error on importing in browser

* fixes:
  #11 Error on importing in browser - fix angular definition
  #11 Error on importing in browser
2 parents b72846d4 5add225b
......@@ -5,11 +5,11 @@
(function (definition) {
// Node export
if(global && module && module.exports) return module.exports = definition();
if(typeof global != 'undefined' && typeof module != 'undefined' && module.exports) return module.exports = definition();
//Browser export
if(window){
if(angular && angular.version.major == 1) return angular.module('relative-placement-js').factory('RelativePlacement', definition);
if(requirejs) return define(definition());
if(typeof window != 'undefined'){
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();
}
......