committed by
Peter Bacon Darwin
parent
a4e4feed90
commit
66af3d5729
@@ -15,8 +15,8 @@ HTML page into a dynamic view. This is a very common pattern in Single-Page Appl
|
||||
state, usually as a result of user interaction (we'll see an example shortly in
|
||||
{@link step_05 step 5}).
|
||||
|
||||
The **template** (the part of the view containing the bindings and presentation logic) acts as a
|
||||
a blueprint for how our data should be organized and presented to the user.
|
||||
The **template** (the part of the view containing the bindings and presentation logic) acts as a
|
||||
blueprint for how our data should be organized and presented to the user.
|
||||
The **controller** provides the context in which the bindings are evaluated and applies behavior
|
||||
and logic to our template.
|
||||
|
||||
|
||||
@@ -109,13 +109,13 @@ Similarly, the accompanying spec file loads the `phonecatApp` module before each
|
||||
that's where our component is registered). Now, imagine that we need a list of phones on another
|
||||
project that we are working on. Thanks to our modular architecture, we don't have to reinvent the
|
||||
wheel; we simply copy the `phone-list/` directory on our other project and add the necessary script
|
||||
tags in our `index.html` file and we are done, right ?
|
||||
tags in our `index.html` file and we are done, right?
|
||||
|
||||
Well, not so fast. The new project doesn't know anything about a `phonecatApp` module. So, we would
|
||||
have to replace all references to `phonecatApp` with the name of this project's main module. As you
|
||||
can imagine this is both laborious and error-prone.
|
||||
|
||||
Yeah, you guessed it: There is a better way !
|
||||
Yeah, you guessed it: There is a better way!
|
||||
|
||||
Each feature/section, will declare its own module and have all related entities registered there.
|
||||
The main module (`phonecatApp`) will declare a dependency on each feature/section module. Now,
|
||||
|
||||
Reference in New Issue
Block a user