docs: glossary and arch fixes; misko influenced

closes #551
This commit is contained in:
Ward Bell 2015-12-15 21:15:04 -08:00
parent 7f58488185
commit 199bf26b0f
4 changed files with 40 additions and 26 deletions

View File

@ -458,7 +458,7 @@ figure
* dependency injection is wired into the framework and used everywhere.<br><br>
* the `Injector` is the main mechanism.
* an injector maintains a *container* of service instances that it created.
* an injector can create a new service instance from a *provider*.
* an injector can create a new service instance using a *provider*.
* a *provider* is a recipe for creating a service.
* we register *providers* with injectors.

View File

@ -355,6 +355,8 @@
<a id="L"></a>
:marked
## Lifecycle Hooks
.l-sub-section
:marked
[Directives](#directive) and [Components](#component) have a lifecycle
managed by Angular as it creates, updates and destroys them.
@ -382,20 +384,32 @@
:marked
Angular apps are modular.
In general we assemble our application from many modules both the ones we write ourselves
In general, we assemble our application from many modules, both the ones we write ourselves
and the ones we acquire from others.
A typical module is a cohesive block of code dedicated to a single purpose.
A module exports something of value in that code, typically one thing such as a class.
A module **exports** something of value in that code, typically one thing such as a class.
A module that needs that thing, **imports** it.
The structure of Angular modules and the import/export syntax
is based on the [ES2015](#es2015) module standard
described [here](http://www.2ality.com/2014/09/es6-modules-final.html).
An application that adheres to this standard requires a module loader to
load modules on request and resolve inter-module dependencies.
Angular does not ship with a module loader and does not have a preference
for any particular 3rd party library (although most samples use SystemJS).
Application developers may pick any module library that conforms to the standard
Modules are typically named after the file in which the exported thing is defined.
The Angular [DatePipe](https://github.com/angular/angular/blob/master/modules/angular2/src/common/pipes/date_pipe.ts)
class belongs to a module named `date_pipe` in the file `date_pipe.ts`.
class belongs to a feature module named `date_pipe` in the file `date_pipe.ts`.
In general, Angular feature modules such as the `data_pipe` are not exposed directly.
Rather they are grouped together with logically related modules in public-facing **library modules**
called [**barrels**](#barrel).
Developers rarely access Angular feature modules directly.
We usually import them from public-facing **library modules**
called [**barrels**](#barrel). Barrels are groups of logically related modules.
The `angular2/core` barrel is a good example.
Learn more in "[Modules, barrels and bundles](https://github.com/angular/angular/blob/master/modules/angular2/docs/bundles/overview.md)".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB