Skip to content

Commit

Permalink
docs(batterystatus): improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Mar 10, 2016
1 parent 848d706 commit 046d17e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/plugins/batterystatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Plugin} from './plugin';
import {Observable} from "rxjs/Observable";

/**
*
* @name Battery Status
*
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
*
Expand All @@ -12,13 +12,16 @@ import {Observable} from "rxjs/Observable";
*
* @usage
* ```js
*
* BatteryStatus.onChange().subscribe(
* // watch change in battery status
* let subscription = BatteryStatus.onChange().subscribe(
* status => {
*
* console.log(status);
* }
* );
*
* // stop watch
* subscription.unsubscribe();
*
* ```
*/
@Plugin({
Expand All @@ -27,7 +30,7 @@ import {Observable} from "rxjs/Observable";
export class BatteryStatus {

/**
* Watches the change in battery level
* Watch the change in battery level
* @returns {Observable} Returns an observable that pushes the new battery level
*/
static onChange () : Observable<any> {
Expand All @@ -38,4 +41,4 @@ export class BatteryStatus {
});
}

}
}

0 comments on commit 046d17e

Please sign in to comment.