Mercurial > hg > ugly-duckling
view 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 |
line wrap: on
line source
import {Component, Inject} from '@angular/core'; import {MailService} from "./mail.service"; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'Ugly'; count = 0; audioBuffer: AudioBuffer = undefined; constructor( private mail: MailService, @Inject('piper-server-uri') private serverUri ) {} onUpdate(id, text) { this.mail.update(id, text); } onAudioLoaded(buffer: AudioBuffer) { this.audioBuffer = buffer; this.count++; } testRef() { this.count++; } }