Here is what we think are the Top 5 Require.js AngularJS Modules at the moment. It is suggested that a modular script loader (like RequireJS) will improve the speed and quality of your code. However, the introduction of require.js into an AngularJS web app can get pretty complicated (to say the least from my experience). On paper it looks easy, but eventually you will run into issues or restrictions of one thing or another.
The official angularjs.org site states in DI, Injector and Providers: “Angular modules solve the problem of removing global state from the application and provide a way of configuring the injector. As opposed to AMD or require.js modules, Angular modules don’t try to solve the problem of script load ordering or lazy script fetching. These goals are totally independent and both module systems can live side by side and fulfill their goals.”. Brian Ford Suggests “I don’t recommend using RequireJS with AngularJS. Although it’s certainly possible, I haven’t seen any instance where RequireJS was beneficial in practice.” in his blog post about huge angular apps. I would tend to agree with him and suggest using require.js only if your loading your modules dynamically (or doing something funky with your modules such as dynamically loading controllers or views) or if various order of script loading really matters such as having multiple JS scripts per modules.
If you are keen to check it out for your project here is a good require.js/angular example of lazy loading AngularJS using Asynchronous Module Definitions with RequireJS or check out a growing number of require angular seed projects to help you get started.
This post was last updated on: 25/6/2015. For an updated list see more Require.js AngularJS Modules.
1. AngularJS Lazy Loading with Require.js by Ifeanyi Isitor
A demonstration of lazy loading in AngularJS using Asynchronous Module Definitions with RequireJS.
2. Angular Require uiRouter by Kuma0605
It’s a improvement in angular+require seed. I make ui-router into require.js.
3. Requirejs Angular Starter by Jcreamer898
This repository is a starting place for building large scale angular.js applications with require.js.
4. Grunt Angular Modularize by Eric Clemmons
Write AngularJS Modules Once. Build with RequireJS (AMD), Browserify (CommonJS), or simply concat.
5. Requirejs Angular Loader Bootstrap by Valeriy
Loading angular components with requirejs
Thank you for reading and if you would like to you can submit your Require.js AngularJS Modules or leave a comment below.
Post tags: require.js, require.