SHARE
TWEET

Untitled

a guest Aug 21st, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ngOnInit(){
  2.     this.audios = new Array<SoundBoardAudio>();
  3.     this.audios.push(new SoundBoardAudio('Western','La canciĆ³n del Sheriff.','western.mp3'));
  4.     this.audios.push(new SoundBoardAudio('Olvidelo Amigo','Busquese otro tonto amigo.','olvidelo_amigo.mp3'));
  5.   }
  6.      
  7. <div class="container">
  8.       <app-soundcard *ngFor="let audio of audios" soundBoardAudio=audio></app-soundcard>
  9.     </div>
  10.      
  11. export class SoundcardComponent implements OnInit {
  12.  
  13.   audio:any;
  14.  
  15.   constructor() {}
  16.  
  17.   @Input() soundBoardAudio;
  18.  
  19.   ngOnInit() {
  20.     console.log(this.soundBoardAudio);
  21.     let audioSrc = 'assets/audio/'+this.soundBoardAudio.filename;
  22.     this.audio = new Audio(audioSrc);
  23.   }
  24. ...
  25.      
  26. <div class="card" >
  27.   <div class="card-block">
  28.     <h2 class="card-title">{{soundBoardAudio.name}}</h2>
  29.     <p>{{soundBoardAudio.desc}}
  30.   </div>
  31. ...
  32.      
  33. <div class="container">
  34.   <app-soundcard *ngFor="let audio of audios" [soundBoardAudio]="audio"></app-soundcard>
  35. </div>
  36.      
  37. <div *ngFor="let pollData of PollList ; let i index" >            
  38.     <app-pollinfo [masterArray]="i"></app-pollinfo>
  39. </div>
  40.      
  41. @Input() masterArray : any;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top