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.

¿Fue útil?

Solución

I ended up just exporting the "angular" global object.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top