* docs(toh-5): dashboard uses [routerLink] bindings #998 closes #998 * chore: temp add toh-5 to bad-code-excerpt-skip-patterns.txt
		
			
				
	
	
		
			29 lines
		
	
	
		
			682 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			682 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 HeroService _heroService;
 | 
						|
 | 
						|
  DashboardComponent(this._heroService);
 | 
						|
 | 
						|
  Future<Null> ngOnInit() async {
 | 
						|
    heroes = (await _heroService.getHeroes()).skip(1).take(4).toList();
 | 
						|
  }
 | 
						|
}
 |