Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- import { Cancion } from '../../model/cancion';
- @Component({
- selector: 'app-playlist',
- templateUrl: './playlist.component.html',
- styleUrls: ['./playlist.component.css']
- })
- export class PlaylistComponent implements OnInit {
- constructor() { }
- nombre:string;
- album:string;
- autor:string;
- canciones:Cancion[] = []
- ngOnInit(): void {
- }
- public agregarCancion(){
- this.canciones.push({
- "nombre": this.nombre,
- "album": this.album,
- "autor": this.autor,
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement