mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(platform): update platform docs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user