5454 _Angular modules_ are a big deal.
5555 This page introduces modules; the [Angular modules](ngmodule.html) page covers them in depth.
5656
57- <br clear = " all " ><br >
57+ <br class = " l-clear-both " ><br >
5858:marked
5959 Every Angular app has at least one module, the _root module_, conventionally named `AppModule`.
6060
@@ -130,7 +130,7 @@ figure
130130 Each Angular library name begins with the `!{_at_angular}` prefix.
131131
132132 You install them with the **npm** package manager and import parts of them with JavaScript `import` statements.
133- <br clear = " all " ><br >
133+ <br class = " l-clear-both " ><br >
134134:marked
135135 For example, import Angular's `Component` decorator from the `@angular/core` library like this:
136136+ makeExample('app/app.component.ts' , 'import' , '' )( format ='.' )
@@ -214,7 +214,7 @@ figure
214214:marked
215215 Notice how `<hero-detail>` rests comfortably among native HTML elements. Custom components mix seamlessly with native HTML in the same layouts.
216216
217- <br clear = " all " >
217+ <br class = " l-clear-both " >
218218
219219.l-hr
220220
@@ -226,7 +226,7 @@ figure
226226
227227:marked
228228<p style =" padding-top :10px " >Metadata tells Angular how to process a class.</p >
229- <br clear = " all " >
229+ <br class = " l-clear-both " >
230230:marked
231231 [Looking back at the code](#component-code) for `HeroListComponent`, you can see that it's just a class.
232232 There is no evidence of a framework, no "Angular" in it at all.
@@ -275,7 +275,7 @@ figure
275275
276276 Apply other metadata !{_decorator}s in a similar fashion to guide Angular behavior.
277277 `@Injectable`, `@Input`, and `@Output` are a few of the more popular !{_decorator}s.
278- <br clear = " all " >
278+ <br class = " l-clear-both " >
279279:marked
280280 The architectural takeaway is that you must add metadata to your code
281281 so that Angular knows what to do.
@@ -296,7 +296,7 @@ figure
296296 Add binding markup to the template HTML to tell Angular how to connect both sides.
297297
298298 As the diagram shows, there are four forms of data binding syntax. Each form has a direction — to the DOM, from the DOM, or in both directions.
299- <br clear = " all " >
299+ <br class = " l-clear-both " >
300300:marked
301301 The `HeroListComponent` [example](#templates) template has three forms:
302302
@@ -330,12 +330,12 @@ figure
330330:marked
331331 Data binding plays an important role in communication
332332 between a template and its component.
333- <br clear = " all " >
333+ <br class = " l-clear-both " >
334334figure
335335 img( src ="/resources/images/devguide/architecture/parent-child-binding.png" alt ="Parent/Child binding" style ="float:left; width:300px; margin-left:-40px;margin-right:10px" )
336336:marked
337337 Data binding is also important for communication between parent and child components.
338- <br clear = " all " >
338+ <br class = " l-clear-both " >
339339
340340.l-hr
341341
@@ -350,7 +350,7 @@ figure
350350
351351 A directive is a class with directive metadata. In !{_Lang}, apply the `@Directive` !{_decorator}
352352 to attach metadata to the class.
353- <br clear = " all " >
353+ <br class = " l-clear-both " >
354354:marked
355355 A component is a *directive-with-a-template*;
356356 a `@Component` !{_decorator} is actually a `@Directive` !{_decorator} extended with template-oriented features.
@@ -410,7 +410,7 @@ figure
410410
411411 Almost anything can be a service.
412412 A service is typically a class with a narrow, well-defined purpose. It should do something specific and do it well.
413- <br clear = " all " >
413+ <br class = " l-clear-both " >
414414:marked
415415 Examples include:
416416 * logging service
@@ -463,7 +463,7 @@ figure
463463 _Dependency injection_ is a way to supply a new instance of a class
464464 with the fully-formed dependencies it requires. Most dependencies are services.
465465 Angular uses dependency injection to provide new components with the services they need.
466- <br clear = " all " >
466+ <br class = " l-clear-both " >
467467:marked
468468 Angular can tell which services a component needs by looking at the types of its constructor parameters.
469469 For example, the constructor of your `HeroListComponent` needs a `HeroService`:
0 commit comments