angular/aio/content/examples/toh-pt5/src/app/hero-detail.component.1.ts
Brandon Roberts 8d01db4638 docs: Updated router guide content and examples for paramMap
and queryParamMap, tracing, and incidental improvements.
closes #16991 and #16259 which it also fixes.
2017-06-29 09:35:39 -07:00

30 lines
894 B
TypeScript

// Imports in comments cause problems when the app is executed
// (some error about 'traceur' missing). Hence this separate file
// is solely for containing the transitory state of the imports.
// #docregion added-imports
// Keep the Input import for now, you'll remove it later:
import { Component, Input, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common';
import { HeroService } from './hero.service';
// #enddocregion added-imports
// Bogus code below this point. It is only here to make lint happy.
import { Hero } from './hero';
@Component({})
export class HeroDetailComponent implements OnInit {
@Input() hero: Hero;
bogus: ParamMap;
constructor(
private heroService: HeroService,
private route: ActivatedRoute,
private location: Location
) {}
ngOnInit() {}
}