<commit_before>import {Component} from '@angular/core';

import {Hero} from './hero';
import {HeroService} from './hero.service';

@Component({
  moduleId: module.id,
  selector: 'my-dashboard',
  templateUrl: 'dashboard.component.html'
})

export class DashboardComponent {

  heroes: Hero[] = [];

  constructor(private heroService: HeroService) { }

  ngOnInit(): void {
    this.heroService.getHeroes()
      .then(data => this.heroes = data.slice(1,5))
  }

  gotoDetail(hero: Hero): void {}

}<commit_msg>complete routing<commit_after>import {Component} from '@angular/core';
import {Router} from '@angular/router';
import {Hero} from './hero';
import {HeroService} from './hero.service';

@Component({
  moduleId: module.id,
  selector: 'my-dashboard',
  templateUrl: 'dashboard.component.html'
})

export class DashboardComponent {

  heroes: Hero[] = [];

  constructor(
    private heroService: HeroService,
    private router: Router
  ) { }

  ngOnInit(): void {
    this.heroService.getHeroes()
      .then(data => this.heroes = data.slice(1,5))
  }

  gotoDetail(hero: Hero): void {
    console.log('go to detail!');
    let link = ['/detail', hero.id];
    this.router.navigate(link);
  }

}
{'fraction_non_alphanumeric': 0.1625207296849088, 'fraction_numerical': 0.003316749585406302, 'mean_word_length': 3.987603305785124, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6480479', 'n_tokens_mistral': 401, 'n_tokens_neox': 396, 'n_words': 89}