docs(platform): update platform docs

This commit is contained in:
mhartington
2015-11-09 13:58:49 -05:00
parent 6774a38b0e
commit c7d36440ec

View File

@@ -30,7 +30,9 @@ export class Platform {
/**
* @param {string} platformName
* @returns {bool}
* @returns {bool} returns true/false based on platform you place
* @description
* Depending on the platform name, isPlatform will return true or flase
*
* ```
* import {Platform} 'ionic/ionic';
@@ -74,22 +76,25 @@ export class Platform {
return this._platforms;
}
/**
* TODO
* @param {string} platformName
* @returns {object}
* @param {string} optional platformName
* @returns {object} An object with various platform info
* - `{object=} `cordova`
* - `{object=}` `platformOS` {str: "9.1", num: 9.1, major: 9, minor: 1}
* - `{object=} `deviceName` Returns the name of the device
* - `{object=}` `device platform` R
* @description
* Returns an object containing the os version
* Returns an object conta
*
* ```
* import {Platform} 'ionic/ionic';
* export MyClass {
* constructor(platform: Platform){
* this.platform = platform;
* console.log(this.platform.versions('android'));
* // Returns an object with the os version as a string,
* // The Major version as a string
* // The Minor version as a string
* console.log(this.platform.versions());
* // or pass in a platform name
* console.log(this.platform.versions('ios'));
* }
* }
* ```
@@ -106,7 +111,6 @@ export class Platform {
}
/**
* TODO
* @returns {promise}
* @description
* Returns a promise when the platform is ready and native functionality can be called