From 3bb0c8ede910af043f9e58a5b89c24797e680095 Mon Sep 17 00:00:00 2001 From: Sujith Savithry Balan M A Date: Thu, 28 Jul 2016 09:15:44 +0530 Subject: [PATCH] track two way binding implemented --- dist/ionic-audio-track-component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dist/ionic-audio-track-component.ts b/dist/ionic-audio-track-component.ts index cb51e72..aa8ff07 100644 --- a/dist/ionic-audio-track-component.ts +++ b/dist/ionic-audio-track-component.ts @@ -58,6 +58,9 @@ export class AudioTrackComponent { constructor(private _audioProvider: AudioProvider) {} ngOnInit() { + this.render(); + } + render() { if (!(this.track instanceof WebAudioTrack) && !(this.track instanceof CordovaAudioTrack)) { this._audioTrack = this._audioProvider.create(this.track); } else { @@ -66,7 +69,7 @@ export class AudioTrackComponent { } // update input track parameter with track is so we pass it to WebAudioProvider if needed - this.track.id = this._audioTrack.id; + this.track.id = this._audioTrack.id; } play() { @@ -153,4 +156,10 @@ export class AudioTrackComponent { } } } + //two way biding enable with ioic-audio + ngOnChanges(change) { + if(change.track) { + this.render(); + } + } } \ No newline at end of file