view src/app/audio-file-open/audio-file-open.component.ts @ 13:b12e78d6185e

Add a component for opening local audio files, unfinished and of course untested. Expect cross-cutting concerns to follow.
author Lucas Thompson <dev@lucas.im>
date Thu, 27 Oct 2016 13:36:09 +0100
parents
children 0571cf863026
line wrap: on
line source
import {Component, OnInit, ViewChild, ElementRef} from '@angular/core';

@Component({
  selector: 'app-audio-file-open',
  templateUrl: './audio-file-open.component.html',
  styleUrls: ['./audio-file-open.component.css']
})
export class AudioFileOpenComponent implements OnInit {

  @ViewChild('open') open: ElementRef;

  constructor() { }

  ngOnInit() {
  }

  openAudio(files: FileList) {
    console.log(files);
    console.log("open");
  }

  openAudioDialog() {
    this.open.nativeElement.click();
  }
}