* docs(displaying-data/dart): proofread - Dart prose simplified by removing discussion of "additions to pubspec.yaml" which are no longer necessary given the current state of QuickStart. - E2e suites passed: public/docs/_examples/displaying-data/dart public/docs/_examples/displaying-data/ts Contributes to #1598 and #1508. * docs(displaying-data/ts): proofread - TS prose updated to include @kwalrath's revisions from a while ago, with some of my edits as well. - E2e suites passed: public/docs/_examples/displaying-data/dart public/docs/_examples/displaying-data/ts * docs(displaying-data/ts): post-review edits
		
			
				
	
	
		
			27 lines
		
	
	
		
			549 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			549 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
// #docregion
 | 
						|
import { Component } from '@angular/core';
 | 
						|
 | 
						|
@Component({
 | 
						|
  selector: 'my-app',
 | 
						|
  // #docregion template
 | 
						|
  template: `
 | 
						|
    <h1>{{title}}</h1>
 | 
						|
    <h2>My favorite hero is: {{myHero}}</h2>
 | 
						|
    <p>Heroes:</p>
 | 
						|
    <ul>
 | 
						|
  // #docregion li
 | 
						|
      <li *ngFor="let hero of heroes">
 | 
						|
        {{ hero }}
 | 
						|
      </li>
 | 
						|
  // #enddocregion li
 | 
						|
    </ul>
 | 
						|
  `
 | 
						|
  // #enddocregion template
 | 
						|
})
 | 
						|
// #docregion class
 | 
						|
export class AppComponent {
 | 
						|
  title = 'Tour of Heroes';
 | 
						|
  heroes = ['Windstorm', 'Bombasto', 'Magneta', 'Tornado'];
 | 
						|
  myHero = this.heroes[0];
 | 
						|
}
 |