Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Modularize Angular #1382

@geddski

Description

@geddski

I noticed on the google group I'm one of many integrating Angular with RequireJS. Are you guys open to the idea of adopting the AMD standard for Angular's internals? Something I love about Angular is it's all about using future web technology today. AMD is today's solution for the upcoming ES6 modules. Adopting RequireJS/AMD would bring the following benefits to projects using Angular:

  1. async loading of dependency files (strong complement to Angular's DI)
  2. combined/compressed/optimized build, including inlined template strings (using RequireJS's r.js)
  3. ability to lazy-load and load-on-demand any controller, templates, services etc.
  4. unused angular modules won't be loaded, like jqlite (if using jQuery) or built in services that aren't used.
  5. gets developers in the module mindset, with a likely straightforward migration path to Harmony modules

Downside is RequireJS adds 15k, but post-build can use require's 1k almond.js shim if necessary. Worth it IMO.

If you're open to this I'm happy to take this on and submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions