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.

The use of the term "module" is confusing given AMD #2078

@huntc

Description

@huntc

Definition of an AMD module

AMD declares how to load modules. Modules are functions declared within a call to a define function. Multiple define statements can occur within one script. Where scripts are loaded is not defined by the AMD specification. Indeed the AMD compliant almond.js loader [1] does not manage the loading of files at all, but requires them to have been loaded prior to the require function being invoked.

Description

As a newcomer to Angular.js I find the distinction between AMD modules and Angular modules highly confusing. To that end, and to serve the distinction made elsewhere [2], would deprecating the use of the "module" name and using "component" be more appropriate? In Spring parlance, a component can be auto-wired (injected) and can receive an @PostConstruct annotated method. This is similar to your config and run functions respectively.

A module in AMD terms can contain a collection of components. Perhaps it is useful to think of modules and components being akin to Java's packages and injectable classes respectively.

[1] https://github.com/jrburke/almond
[2] #1382

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