Quickstart updates.
This commit is contained in:
		
							parent
							
								
									8752fffe2e
								
							
						
					
					
						commit
						bee30ca1ad
					
				| @ -95,8 +95,8 @@ p. | ||||
|       @Component({ | ||||
|         selector: 'my-app' | ||||
|       }) | ||||
|       @Template({ | ||||
|         inline: '<h1>Hello {{ name }}</h1>' | ||||
|       @View({ | ||||
|         template: '<h1>Hello {{ name }}</h1>' | ||||
|       }) | ||||
|       // Component controller | ||||
|       class MyAppComponent { | ||||
| @ -106,28 +106,22 @@ p. | ||||
|       } | ||||
| 
 | ||||
|   .l-sub-section | ||||
|     h3 Component annotations | ||||
|     h3 @Component and @View annotations | ||||
| 
 | ||||
|     p. | ||||
|       A component annotation provides metadata about the component. | ||||
|       An annotation can be identified by its at-sign (<code>@</code>). | ||||
|       A component annotation describes details about the component. An annotation can be identified by its at-sign (<code>@</code>). | ||||
|     p. | ||||
|       The <code>@Component</code> annotation defines | ||||
|       the HTML tag for the component by specifying the component's CSS selector. | ||||
|       The <code>@Component</code> annotation defines the HTML tag for the component by specifying the component's CSS selector. | ||||
|     p. | ||||
|       The <code>@Template</code> annotation defines the HTML that | ||||
|       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. | ||||
|       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. | ||||
| 
 | ||||
|     pre.prettyprint.linenums | ||||
|       code. | ||||
|         @Component({ | ||||
|           selector: 'my-app' // Defines the <my-app></my-app> tag | ||||
|         }) | ||||
|         @Template({ | ||||
|           inline: '<h1>Hello {{ name }}</h1>' // Defines the inline template for the component | ||||
|         @View({ | ||||
|           template: '<h1>Hello {{ name }}</h1>' // Defines the inline template for the component | ||||
|         }) | ||||
| 
 | ||||
|     p. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user