Mercurial > hg > ugly-duckling
comparison 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 |
comparison
equal
deleted
inserted
replaced
12:1244f556512f | 13:b12e78d6185e |
---|---|
1 import {Component, OnInit, ViewChild, ElementRef} from '@angular/core'; | |
2 | |
3 @Component({ | |
4 selector: 'app-audio-file-open', | |
5 templateUrl: './audio-file-open.component.html', | |
6 styleUrls: ['./audio-file-open.component.css'] | |
7 }) | |
8 export class AudioFileOpenComponent implements OnInit { | |
9 | |
10 @ViewChild('open') open: ElementRef; | |
11 | |
12 constructor() { } | |
13 | |
14 ngOnInit() { | |
15 } | |
16 | |
17 openAudio(files: FileList) { | |
18 console.log(files); | |
19 console.log("open"); | |
20 } | |
21 | |
22 openAudioDialog() { | |
23 this.open.nativeElement.click(); | |
24 } | |
25 } |