AngularJS module

From Wiki @ Karl Jones dot com
Revision as of 12:43, 31 December 2016 by Karl Jones (Talk | contribs) (Created page with "In AngularJS, a module Angular apps are modular. They consist of many files each dedicated to a purpose. ES5 JavaScript doesn't have a native module system. There are sever...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In AngularJS, a module

Angular apps are modular. They consist of many files each dedicated to a purpose.

ES5 JavaScript doesn't have a native module system. There are several popular 3rd party module systems available.

Module interaction

In Angular apps, modules reference other modules using the app object.

When another module needs to refer to AppComponent, it gets it from app.AppComponent.

Angular modularity

Angular is also modular. It is a collection of library modules. Each library is itself a module made up of several, related feature modules.

When we need something from Angular, we use the ng object.