I ended up just exporting the "angular" global object.
Can you use AngularJS's plugins with "enforceDefine" on RequireJS's shims?
-
04-06-2022 - |
Pregunta
So in the shim config of RequireJS, you can identify an "export" string option. This works for things that exports globals. However how do you do this for angular-resource or angular-cookies?
For jQuery plugins, you just find the relevant jquery object. But this does not work for AngularJS when I have "enforceDefine" enabled.
I've tried exports: "angular.module('ngResource')" but it didn't work either.
Inside the source code of angular-resource, it just adds things to the angular.module.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow