Skip to content

Commit

Permalink
tarea 1
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJonaCode committed Sep 25, 2020
1 parent 6368289 commit 26156bf
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
27 changes: 26 additions & 1 deletion src/app/components/heroe/heroe.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
<p>heroe works!</p>
<h1 class="animated fadeIn"> {{heroe.nombre}} <small>{{heroe.aparicion}}</small></h1>
<hr>

<div class="row animated fadeIn fast">

<div class="col-md-4">

<img [src]="heroe.img" class="img-fluid" [alt]="heroe.nombre">
<br><br>
<a [routerLink]="['/heroes'] " class="btn btn-outline-danger btn-block">Regresar</a>

</div>

<div class="col-md-8">
<h3> {{heroe.nombre}} </h3>
<hr>
<p>
{{heroe.bio}}
</p>
<div>
<img *ngIf="heroe.casa=='Marvel'" class="img-logo" src="assets/img/marvel.png" alt="Marvel">
<img *ngIf="heroe.casa=='DC'" class="img-logo" src="assets/img/dc_logo.png" alt="DC">
</div>
</div>

</div>
1 change: 1 addition & 0 deletions src/app/components/heroe/heroe.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class HeroeComponent {

this.activatedRoute.params.subscribe( params =>{
this.heroe = this._heroesService.getHeroe( params['id'] );
console.log(this.heroe);
} );

}
Expand Down
Binary file added src/assets/img/dc_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/marvel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/marvel_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ body{
.main-container{
margin-top: 20px;
}

.img-logo{
width: 120px;
}



Expand Down

0 comments on commit 26156bf

Please sign in to comment.