Advertisement
JVFabia

playlist.component.ts

Aug 17th, 2020
2,432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component, OnInit } from '@angular/core';
  2. import { Cancion } from '../../model/cancion';
  3.  
  4.  
  5. @Component({
  6.   selector: 'app-playlist',
  7.   templateUrl: './playlist.component.html',
  8.   styleUrls: ['./playlist.component.css']
  9. })
  10. export class PlaylistComponent implements OnInit {
  11.  
  12.   constructor() { }
  13.  
  14.   nombre:string;
  15.   album:string;
  16.   autor:string;
  17.  
  18.   canciones:Cancion[] = []
  19.  
  20.   ngOnInit(): void {
  21.  
  22.   }
  23.  
  24.  
  25.   public agregarCancion(){
  26.     this.canciones.push({
  27.       "nombre": this.nombre,
  28.       "album": this.album,
  29.       "autor": this.autor,
  30.     })
  31.   }
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement