jsp
This commit is contained in:
29
src/app/my-component/my-component.component.ts
Normal file
29
src/app/my-component/my-component.component.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Component } from '@angular/core';
|
||||
//import { constructor } from 'jasmine';
|
||||
import { Pokemon } from '../pokemon';
|
||||
|
||||
@Component({
|
||||
selector: 'app-my-component',
|
||||
templateUrl: './my-component.component.html',
|
||||
styleUrl: './my-component.component.css'
|
||||
})
|
||||
export class MyComponentComponent {
|
||||
id: string;
|
||||
selectedPokeId : string;
|
||||
|
||||
pokes : Pokemon[] = [];
|
||||
|
||||
constructor(){
|
||||
this.pokes.push(new Pokemon('2', "Herbizarre"));
|
||||
this.pokes.push(new Pokemon('3', "Florizarre"));
|
||||
this.pokes.push(new Pokemon('4', "Salamèche"));
|
||||
this.pokes.push(new Pokemon('5', "Reptincel"));
|
||||
this.pokes.push(new Pokemon('6', "Dracaufeu"));
|
||||
this.pokes.push(new Pokemon('7', "Carapute"));
|
||||
this.pokes.push(new Pokemon('8', "Carabaffe"));
|
||||
this.pokes.push(new Pokemon('9', "Tortank"));
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user