annotate src/app/app.component.ts @ 19:953932e9ba82

Remove zone injection from app.component and move to where the event is emitted in audio-file-open.component.
author Lucas Thompson <dev@lucas.im>
date Fri, 28 Oct 2016 08:28:54 +0100
parents ff964b28a272
children 3e96bcbfa5c5
rev   line source
dev@19 1 import {Component, Inject} from '@angular/core';
dev@1 2 import {MailService} from "./mail.service";
angular-cli@0 3
angular-cli@0 4 @Component({
angular-cli@0 5 selector: 'app-root',
angular-cli@0 6 templateUrl: './app.component.html',
angular-cli@0 7 styleUrls: ['./app.component.css']
angular-cli@0 8 })
angular-cli@0 9 export class AppComponent {
dev@3 10 title = 'Ugly';
dev@1 11
dev@16 12 count = 0;
dev@16 13 audioBuffer: AudioBuffer = undefined;
dev@16 14
dev@1 15 constructor(
dev@1 16 private mail: MailService,
dev@19 17 @Inject('piper-server-uri') private serverUri
dev@1 18 ) {}
dev@1 19
dev@1 20 onUpdate(id, text) {
dev@1 21 this.mail.update(id, text);
dev@1 22 }
dev@16 23
dev@16 24 onAudioLoaded(buffer: AudioBuffer) {
dev@19 25 this.audioBuffer = buffer;
dev@19 26 this.count++;
dev@16 27 }
dev@16 28
dev@16 29 testRef() {
dev@16 30 this.count++;
dev@16 31 }
angular-cli@0 32 }