* toh-6: trim spaces from cache file to simplify diff * toh-6: copy latest over cache before editing latest * docs(toh-6): post-RC5 Dart resync and TS fixes Contributes to #2077. TS-side changes include: - Merged three versions of `app/app.module{,1,2}.ts` into a single file and used docregions instead. - Misnamed files: - `rxjs-operators.ts` -> `rxjs-extensions.ts` - `hero-search.service.html` -> `hero-search.component.html` - Fixed BAD FILENAME error. Lint reports no errors and toh-6 e2e tests pass.
		
			
				
	
	
		
			38 lines
		
	
	
		
			861 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			861 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
// #docregion
 | 
						|
import 'dart:async';
 | 
						|
 | 
						|
import 'package:angular2/core.dart';
 | 
						|
import 'package:angular2/router.dart';
 | 
						|
 | 
						|
import 'hero.dart';
 | 
						|
import 'hero_service.dart';
 | 
						|
// #docregion search
 | 
						|
import 'hero_search_component.dart';
 | 
						|
 | 
						|
@Component(
 | 
						|
    selector: 'my-dashboard',
 | 
						|
    templateUrl: 'dashboard_component.html',
 | 
						|
    styleUrls: const ['dashboard_component.css'],
 | 
						|
    directives: const [HeroSearchComponent])
 | 
						|
// #enddocregion search
 | 
						|
class DashboardComponent implements OnInit {
 | 
						|
  List<Hero> heroes;
 | 
						|
 | 
						|
  final Router _router;
 | 
						|
  final HeroService _heroService;
 | 
						|
 | 
						|
  DashboardComponent(this._heroService, this._router);
 | 
						|
 | 
						|
  Future<Null> ngOnInit() async {
 | 
						|
    heroes = (await _heroService.getHeroes()).skip(1).take(4).toList();
 | 
						|
  }
 | 
						|
 | 
						|
  void gotoDetail(Hero hero) {
 | 
						|
    var link = [
 | 
						|
      'HeroDetail',
 | 
						|
      {'id': hero.id.toString()}
 | 
						|
    ];
 | 
						|
    _router.navigate(link);
 | 
						|
  }
 | 
						|
}
 |