Quickstart updates.
This commit is contained in:
		
							parent
							
								
									8752fffe2e
								
							
						
					
					
						commit
						bee30ca1ad
					
				| @ -95,8 +95,8 @@ p. | |||||||
|       @Component({ |       @Component({ | ||||||
|         selector: 'my-app' |         selector: 'my-app' | ||||||
|       }) |       }) | ||||||
|       @Template({ |       @View({ | ||||||
|         inline: '<h1>Hello {{ name }}</h1>' |         template: '<h1>Hello {{ name }}</h1>' | ||||||
|       }) |       }) | ||||||
|       // Component controller |       // Component controller | ||||||
|       class MyAppComponent { |       class MyAppComponent { | ||||||
| @ -106,28 +106,22 @@ p. | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|   .l-sub-section |   .l-sub-section | ||||||
|     h3 Component annotations |     h3 @Component and @View annotations | ||||||
| 
 | 
 | ||||||
|     p. |     p. | ||||||
|       A component annotation provides metadata about the component. |       A component annotation describes details about the component. An annotation can be identified by its at-sign (<code>@</code>). | ||||||
|       An annotation can be identified by its at-sign (<code>@</code>). |  | ||||||
|     p. |     p. | ||||||
|       The <code>@Component</code> annotation defines |       The <code>@Component</code> annotation defines the HTML tag for the component by specifying the component's CSS selector. | ||||||
|       the HTML tag for the component by specifying the component's CSS selector. |  | ||||||
|     p. |     p. | ||||||
|       The <code>@Template</code> annotation defines the HTML that |       The <code>@View</code> annotation defines the HTML that represents the component. The component you wrote uses an inline template, but you can also have an external template. To use an external template, specify a <code>templateUrl</code> property and give it the path to the HTML file. | ||||||
|       represents the component. This component uses an inline template, |  | ||||||
|       but you can also have an external template. To use an external template, |  | ||||||
|       specify a <code>url</code> property |  | ||||||
|       and give it the path to the HTML file. |  | ||||||
| 
 | 
 | ||||||
|     pre.prettyprint.linenums |     pre.prettyprint.linenums | ||||||
|       code. |       code. | ||||||
|         @Component({ |         @Component({ | ||||||
|           selector: 'my-app' // Defines the <my-app></my-app> tag |           selector: 'my-app' // Defines the <my-app></my-app> tag | ||||||
|         }) |         }) | ||||||
|         @Template({ |         @View({ | ||||||
|           inline: '<h1>Hello {{ name }}</h1>' // Defines the inline template for the component |           template: '<h1>Hello {{ name }}</h1>' // Defines the inline template for the component | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|     p. |     p. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user