8

We are currently planning a website which exists out of different AngularJS apps that will make use of common services. Services will be implemented in seperate files; to minimize the filesize of the apps we want to include/concatenate only those service-files that are used in the corresponding app - so we are looking for the best practise in dependency management.

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

2
  • 2
    Me personally? I'd just use Grunt and call it a day. Commented Aug 25, 2013 at 15:57
  • Grunt is not a dependency manager. Commented Apr 25, 2015 at 18:58

3 Answers 3

3

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

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

Sign up to request clarification or add additional context in comments.

Comments

2

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

Yeoman 1.0 is more than just a tool. It's a workflow; a collection of tools and best practices working in harmony to make developing for the web even better.

So basically, it is a npm that installs all the boilerplate files, dependencies and configures your whole app with the help of generators. It uses bower and gruntalso takes care of the hard part of configuring grunt that is in charge of building/deploying your app.
I highly recommend yeoman as a modern and efficient workflow.

2 Comments

yeoman and angularjs seem to be very common today, but it looks like that the angular-generator focuses on one single app. is it possible to define multiple modules/apps so that the apps can use common services?!
You could certainly customize your own generators in order to suit your needs, but for individual modules/scripts the common approach is to manage them trough bower. You can (and should!) install/remove/update packages (scripts/git repos/modules) in your app using it.
0

I personally haven't looked at the ng-boilerplate as @Julio mentioned above, but you could easily manage to configure and use RequireJS with angular of you want to. I've done it and it works like a charm.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.