{"id":747,"date":"2018-02-25T20:33:23","date_gmt":"2018-02-25T12:33:23","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/25\/ionic-%e5%b9%b3%e5%8f%b0\/"},"modified":"2018-02-25T20:33:23","modified_gmt":"2018-02-25T12:33:23","slug":"ionic-%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=747","title":{"rendered":"ionic \u5e73\u53f0"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>ionic \u5e73\u53f0<\/h1>\n<hr>\n<h2>$ionicPlatform<\/h2>\n<p>$ionicPlatform \u7528\u6765\u68c0\u6d4b\u5f53\u524d\u7684\u5e73\u53f0\uff0c\u4ee5\u53ca\u8bf8\u5982\u5728PhoneGap\/Cordova\u4e2d\u8986\u76d6Android\u540e\u9000\u6309\u94ae\u3002<\/p>\n<h3>\u65b9\u6cd5<\/h3>\n<pre>\nonHardwareBackButton(callback)\n<\/pre>\n<p>\u6709\u786c\u4ef6\u7684\u540e\u9000\u6309\u94ae\u7684\u5e73\u53f0\uff0c\u53ef\u4ee5\u7528\u8fd9\u79cd\u65b9\u6cd5\u7ed1\u5b9a\u5230\u5b83\u3002<\/p>\n<table class=\"reference\">\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8be6\u60c5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n        callback<\/p>\n<\/td>\n<td>\n<p>  <code>function<\/code>\n      <\/td>\n<td>\n<p>\u5f53\u8be5\u4e8b\u4ef6\u53d1\u751f\u65f6\uff0c\u89e6\u53d1\u56de\u8c03\u51fd\u6570\u3002<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre>offHardwareBackButton(callback)<\/pre>\n<p>\u79fb\u9664\u540e\u9000\u6309\u94ae\u7684\u76d1\u542c\u4e8b\u4ef6\u3002<\/p>\n<table class=\"reference\">\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8be6\u60c5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n        callback<\/p>\n<\/td>\n<td>\n<p>  <code>function<\/code>\n      <\/td>\n<td>\n<p>\u6700\u521d\u7ed1\u5b9a\u7684\u76d1\u89c6\u5668\u51fd\u6570\u3002<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre>\nregisterBackButtonAction(callback, priority, [actionId])\n<\/pre>\n<p>\u6ce8\u518c\u786c\u4ef6\u540e\u9000\u6309\u94ae\u52a8\u4f5c\u3002\u5f53\u70b9\u51fb\u6309\u94ae\u65f6\uff0c\u53ea\u6709\u4e00\u4e2a\u52a8\u4f5c\u4f1a\u6267\u884c\uff0c\u56e0\u6b64\u8be5\u65b9\u6cd5\u51b3\u5b9a\u4e86\u6ce8\u518c\u7684\u540e\u9000\u6309\u94ae\u52a8\u4f5c\u5177\u6709\u6700\u9ad8\u7684\u4f18\u5148\u7ea7\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u4e00\u4e2a\u4e0a\u62c9\u83dc\u5355\u5df2\u7ecf\u663e\u793a\uff0c\u540e\u9000\u6309\u94ae\u5e94\u8be5\u5173\u95ed\u4e0a\u62c9\u83dc\u5355\uff0c\u800c\u4e0d\u662f\u8fd4\u56de\u4e00\u4e2a\u9875\u9762\u89c6\u56fe\u6216\u5173\u95ed\u4e00\u4e2a\u6253\u5f00\u7684\u6a21\u578b\u3002<\/p>\n<table class=\"reference\">\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8be6\u60c5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n        callback<\/p>\n<\/td>\n<td>\n<p>  <code>function<\/code>\n      <\/td>\n<td>\n<p>\u5f53\u70b9\u51fb\u8fd4\u56de\u6309\u94ae\u65f6\u89e6\u53d1\uff0c\u5982\u679c\u8be5\u76d1\u89c6\u5668\u5177\u6709\u6700\u9ad8\u7684\u4f18\u5148\u7ea7\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n        priority<\/p>\n<\/td>\n<td>\n<p>  <code>number<\/code>\n      <\/td>\n<td>\n<p>\u4ec5\u6700\u9ad8\u4f18\u5148\u7ea7\u7684\u4f1a\u6267\u884c\u3002<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n        actionId<\/p>\n<div><em>(\u53ef\u9009)<\/em><\/div>\n<\/td>\n<td>\n<p>  <code>*<\/code>\n      <\/td>\n<td>\n<p>\u8be5id\u6307\u5b9a\u8fd9\u4e2a\u52a8\u4f5c\u3002\u9ed8\u8ba4\uff1a\u4e00\u4e2a\u968f\u673a\u4e14\u552f\u4e00\u7684id\u3002<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>\u8fd4\u56de\u503c:<\/b> \u51fd\u6570\uff0c \u4e00\u4e2a\u88ab\u89e6\u53d1\u7684\u51fd\u6570\uff0c\u5c06\u4f1a\u6ce8\u9500 backButtonAction\u3002<\/p>\n<pre>ready([callback])<\/pre>\n<p>\n\u8bbe\u5907\u51c6\u5907\u5c31\u7eea\uff0c\u5219\u89e6\u53d1\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\u3002<\/p>\n<table class=\"reference\">\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8be6\u60c5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n        callback<\/p>\n<div><em>(\u53ef\u9009)<\/em><\/div>\n<\/td>\n<td>\n<p>  <code>function=<\/code>\n      <\/td>\n<td>\n<p>\u89e6\u53d1\u7684\u51fd\u6570\u3002<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd4\u56de: promise\u5bf9\u8c61, \u5bf9\u8c61\u88ab\u6784\u9020 \u6210\u529f\u540e\u5f97\u5230\u89e3\u6790\u3002<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">ionic \u5e73\u53f0 $ionicPlatform $ionicPlatform \u7528\u6765\u68c0\u6d4b\u5f53\u524d&hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=747\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,26],"tags":[43,72,73,93],"class_list":["post-747","post","type-post","status-publish","format-standard","hentry","category-hybrid","category-mobile","tag-angular","tag-hybrid","tag-ionic","tag-mobile","zoom-theme-has-thumb"],"_links":{"self":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=747"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/747\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}