-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5eb5066
commit ea7d6a7
Showing
11 changed files
with
11,355 additions
and
72 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<!-- <app-contador></app-contador> --> | ||
<app-contador></app-contador> | ||
|
||
<app-heroe></app-heroe> | ||
<!-- <app-heroe></app-heroe> --> | ||
<!-- <app-listado></app-listado> --> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ContadorComponent } from './contador/contador.component'; | ||
|
||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
ContadorComponent | ||
], | ||
exports: [ | ||
ContadorComponent | ||
], | ||
imports: [ | ||
CommonModule | ||
] | ||
}) | ||
export class ContadorModule { } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { HeroeComponent } from './heroe/herore.component'; | ||
import { ListadoComponent } from './listado/listado.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
HeroeComponent, | ||
ListadoComponent | ||
], | ||
exports: [ | ||
ListadoComponent | ||
], | ||
imports: [ | ||
CommonModule | ||
] | ||
}) | ||
export class HeoresModule {} |
22 changes: 22 additions & 0 deletions
22
workspace/01-Bases/src/app/heroes/listado/listado.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<p>Listado de Héroes</p> | ||
<div> | ||
|
||
<p *ngIf="heroeBorrado; else noBorrado"> | ||
Héroe borrado: <small> {{ heroeBorrado }}</small> | ||
</p> | ||
|
||
<ng-template #noBorrado> | ||
<p>No ha borrado nada.</p> | ||
</ng-template> | ||
|
||
<button (click)="borrarHeroe()" *ngIf="heroes.length > 0"> | ||
Borrar | ||
</button> | ||
|
||
<ul> | ||
<li *ngFor="let heroe of heroes; let i = index"> | ||
{{ i + 1 }} {{ heroe }} | ||
</li> | ||
</ul> | ||
|
||
</div> |
16 changes: 16 additions & 0 deletions
16
workspace/01-Bases/src/app/heroes/listado/listado.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-listado', | ||
templateUrl: './listado.component.html' | ||
}) | ||
export class ListadoComponent { | ||
|
||
heroes: string[] = ['Spiderman', 'Iron man', 'Hulk', 'Thor', 'Capitán América']; | ||
heroeBorrado: string = ''; | ||
|
||
borrarHeroe() { | ||
this.heroeBorrado = this.heroes.shift() || 'No hay más héroes.'; | ||
} | ||
|
||
} |