V
V
vasIvas2015-08-01 00:39:39
Angular
vasIvas, 2015-08-01 00:39:39

How bad is it to use AngularJS + RequireJS?

I have already met several times the mention of the AngularJS + RequireJS bundle, but how bad is this really? After all, RequireJS is essentially an injector that already exists in angular. Or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-08-01
@vasIvas

Not really, requirejs is a module manager, but angular's dependency container for smaller modules/services. On the other hand, angular has its own module manager (angular.module) with lazy initialization and other charms.
Personally, I don’t see any benefit from using requirejs + angular (I tried it, I didn’t like it), at least because of the very bold require.js syntax. Since angular does not know how to load its modules asynchronously (the application must be loaded in its entirety in order to run), the profit from AMD is even more doubtful. You can still try browserify and commonjs, but again, with the advent of es2015, this makes little sense.
In angular2, let's say they abandoned their module system and completely switched to modules from es2015. I also use them in angular1.x projects, for example, and have a lot of fun.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question