Mercurial > hg > ugly-duckling
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/app/audio-file-open/audio-file-open.component.ts Thu Oct 27 13:36:09 2016 +0100 @@ -0,0 +1,25 @@ +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(); + } +}