I had started writing an app using angularJS. After a few weeks, I suddenly realized that I should have used require JS from the beginning to load my modules. Yes, I know, it wa
Looking at the sources for Angular, I do not see anywhere that it calls RequireJS' define
so you need a shim for it. Add this to your shim
configuration:
angular: {
exports: "angular"
}
By the way, the priority
field in your configuration is obsolete. Either you use RequireJS 2.x which ignores this field because priority
is supported only by RequireJS 1.x. Or you use RequireJS 1.x which would honor priority
but would ignore the shim
field because shim
was introduced in 2.x. My suggestion: use RequireJS 2.x and remove priority
.