From 24c8d5d627b19d5bfed0cfefa90c3f69c6d5acf1 Mon Sep 17 00:00:00 2001 From: Joel Szwarga Date: Sat, 1 Apr 2017 22:38:17 -0400 Subject: [PATCH] docs(music-controls): fix example code (#1315) The sample code does not work...this change returns the observable first with subscribe() before actually calling the Observable's subscribe method. In fact, the way it's written in the example, the code would not build because of typescript errors. --- src/@ionic-native/plugins/music-controls/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/music-controls/index.ts b/src/@ionic-native/plugins/music-controls/index.ts index 43c4dcca1..0828f8916 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -56,7 +56,7 @@ export interface MusicControlsOptions { * ticker : 'Now playing "Time is Running Out"' * }); * - * this.musicControls.subscribe(action => { + * this.musicControls.subscribe().subscribe(action => { * * switch(action) { * case 'music-controls-next':