mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: updated docs removed unnecessary imports and empty methods (#48546)
Removed empty methods and unnecessary imports in files PR Close #48546
This commit is contained in:
committed by
Alex Rickabaugh
parent
67ec04683c
commit
98615c74b5
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { Hero } from '../hero';
|
||||
import { HEROES } from '../mock-heroes';
|
||||
|
||||
@@ -7,17 +7,12 @@ import { HEROES } from '../mock-heroes';
|
||||
templateUrl: './heroes.component.html',
|
||||
styleUrls: ['./heroes.component.css']
|
||||
})
|
||||
export class HeroesComponent implements OnInit {
|
||||
export class HeroesComponent {
|
||||
|
||||
heroes = HEROES;
|
||||
|
||||
selectedHero!: Hero;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onSelect(hero: Hero): void {
|
||||
this.selectedHero = hero;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Hero } from '../hero';
|
||||
|
||||
@Component({
|
||||
@@ -6,13 +6,8 @@ import { Hero } from '../hero';
|
||||
templateUrl: './hero-detail.component.html',
|
||||
styleUrls: ['./hero-detail.component.css']
|
||||
})
|
||||
export class HeroDetailComponent implements OnInit {
|
||||
export class HeroDetailComponent {
|
||||
|
||||
@Input() hero: Hero | undefined;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-app404',
|
||||
templateUrl: './app404.component.html',
|
||||
styleUrls: ['./app404.component.css']
|
||||
})
|
||||
export class App404Component implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
export class App404Component {}
|
||||
|
||||
Reference in New Issue
Block a user