AngularJS: Dependency Management

We are currently planning a site that exists from different AngularJS applications that will use shared services. Services will be implemented in separate files; in order to minimize the size of the application files that we want to include / merge only the service files that are used in the corresponding application, we are therefore looking for best practices for managing dependencies.

is there something like requireJS in angular or what would you suggest to handle with include? thanks in advance.)

+8
javascript angularjs
source share
3 answers

I suggest using the same organization as ng-templateplate: https://github.com/joshdmiller/ng-boilerplate

I use an organization close to ng-catplat for one project, and this allowed us to be modular in our dependency management.

+3
source share

For me, the only build / deployment system that works like a charm for most web applications with extremely complex js, yeoman computation .
This quote should describe what it does / does:

Yeoman 1.0 is more than just a tool. This is a workflow; A set of tools and best practices that work in harmony to make web development even better.

Basically it is npm , which installs all the template files, dependencies and configures your entire application using generators . It uses bower and grunt also takes care of the hard part of the grunt configuration, which is responsible for creating / deploying your application.
I highly recommend yeoman as a modern and efficient > workflow.

+2
source share

I personally did not consider ng-boilerplate as @Julio mentioned above, but you can easily configure and use RequireJS with angular. I did it and it works like a charm.

0
source share

All Articles