closes #1009 Remove public access modifier on AppComponent properties to be consistent throughout code tutorial
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // #docregion show-hero
 | |
| template: '<h1>{{title}}</h1><h2>{{hero}} details!</h2>'
 | |
| // #enddocregion show-hero
 | |
| 
 | |
| // #docregion show-hero-2
 | |
| template: '<h1>{{title}}</h1><h2>{{hero.name}} details!</h2>'
 | |
| // #enddocregion show-hero-2
 | |
| 
 | |
| // #docregion show-hero-properties
 | |
| template: '<h1>{{title}}</h1><h2>{{hero.name}} details!</h2><div><label>id: </label>{{hero.id}}</div><div><label>name: </label>{{hero.name}}</div>'
 | |
| // #enddocregion show-hero-properties
 | |
| 
 | |
| // #docregion multi-line-strings
 | |
| template:`
 | |
|   <h1>{{title}}</h1>
 | |
|   <h2>{{hero.name}} details!</h2>
 | |
|   <div><label>id: </label>{{hero.id}}</div>
 | |
|   <div><label>name: </label>{{hero.name}}</div>
 | |
|   `
 | |
| // #enddocregion multi-line-strings
 | |
| 
 | |
| // #docregion editing-Hero
 | |
| template:`
 | |
|   <h1>{{title}}</h1>
 | |
|   <h2>{{hero.name}} details!</h2>
 | |
|   <div><label>id: </label>{{hero.id}}</div>
 | |
|   <div>
 | |
|     <label>name: </label>
 | |
|     <input value="{{hero.name}}" placeholder="name">
 | |
|   </div>
 | |
|   `
 | |
| // #enddocregion editing-Hero
 | |
| 
 | |
| // #docregion app-component-1
 | |
| export class AppComponent {
 | |
|   title = 'Tour of Heroes';
 | |
|   hero = 'Windstorm';
 | |
| }
 | |
| // #enddocregion app-component-1
 | |
| 
 | |
| // #docregion hero-property-1
 | |
| hero: Hero = {
 | |
|   id: 1,
 | |
|   name: 'Windstorm'
 | |
| };
 | |
| // #enddocregion hero-property-1
 |