0
無法在視圖來獲取設備信息 -使用ionic.Platform獲取設備信息
angular.module('PlatformApp', ['ionic'])
.controller('PlatformCtrl', function($scope) {
ionic.Platform.ready(function(){
// will execute when device is ready, or immediately if the device is already ready.
});
var deviceInformation = ionic.Platform.device();
});
我如何從VAR deviceInformation設備信息?
我知道deviceInformation.model將檢索設備的型號名稱 - 但離子網站上的指南並未顯示如何完成此操作?我似乎嘗試的一切看起來並沒有工作得到空白/空的對象。
http://ionicframework.com/docs/api/utility/ionic.Platform/
http://ngcordova.com/docs/plugins/device/ –
你在設備或瀏覽器 –
都測試:(我會稍後張貼更多的代碼 – Zabs