{"id":737,"date":"2018-02-25T20:33:16","date_gmt":"2018-02-25T12:33:16","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/25\/ionic-%e4%b8%8b%e6%8b%89%e5%88%b7%e6%96%b0\/"},"modified":"2018-02-25T20:33:16","modified_gmt":"2018-02-25T12:33:16","slug":"ionic-%e4%b8%8b%e6%8b%89%e5%88%b7%e6%96%b0","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=737","title":{"rendered":"ionic \u4e0b\u62c9\u5237\u65b0"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>ionic \u4e0b\u62c9\u5237\u65b0<\/h1>\n<p>\u5728\u52a0\u8f7d\u65b0\u6570\u636e\u7684\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5b9e\u73b0\u4e0b\u62c9\u5237\u65b0\u6548\u679c\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<hr>\n<h2>\u5b9e\u4f8b<\/h2>\n<h3>HTML \u4ee3\u7801<\/h3>\n<pre>\n&lt;body ng-app=\"starter\" ng-controller=\"actionsheetCtl\" &gt;\n    &lt;ion-pane&gt;\n        &lt;ion-content &gt;\n            &lt;ion-refresher pulling-text=\"\u4e0b\u62c9\u5237\u65b0\" on-refresh=\"doRefresh()\"&gt;&lt;\/ion-refresher&gt;\n            &lt;ion-list&gt;\n                &lt;ion-item ng-repeat=\"item in items\" ng-bind=\"item.name\"&gt;&lt;\/ion-item&gt;\n            &lt;\/ion-list&gt;\n        &lt;\/ion-content&gt;\n    &lt;\/ion-pane&gt;\n&lt;\/body&gt;\n<\/pre>\n<h3>JavaScript \u4ee3\u7801<\/h3>\n<pre>\nangular.module('starter', ['ionic'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    \/\/ Hide the accessory bar by default (remove this to show the accessory bar above the keyboard\n    \/\/ for form inputs)\n    if(window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {\n      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);\n    }\n    if(window.StatusBar) {\n      StatusBar.styleDefault();\n    }\n  });\n})\n\n.controller( 'actionsheetCtl',['$scope','$timeout' ,'$http',function($scope,$timeout,$http){\n\n    $scope.items=[\n        {\n            \"name\":\"HTML5\"\n        },\n        {\n            \"name\":\"JavaScript\"\n        },\n        {\n            \"name\":\"Css3\"\n        }\n    ];\n\n    $scope.doRefresh = function() {\n        $http.get('http:\/\/www.runoob.com\/try\/demo_source\/item.json')  \/\/\u6ce8\u610f\u6539\u4e3a\u81ea\u5df1\u672c\u7ad9\u7684\u5730\u5740\uff0c\u4e0d\u7136\u4f1a\u6709\u8de8\u57df\u95ee\u9898\n            .success(function(newItems) {\n                $scope.items = newItems;\n            })\n            .finally(function() {\n                $scope.$broadcast('scroll.refreshComplete');\n            });\n    };\n}])\n<\/pre>\n<p>item.json \u6587\u4ef6\u6570\u636e\uff1a<\/p>\n<pre>\n[\n    {\n        \"name\":\"\u83dc\u9e1f\u6559\u7a0b\"\n    },\n    {\n        \"name\":\"www.runoob.com\"\n    }\n]\n<\/pre>\n<p><a href=\"\/try\/tryit.php?filename=ionic_ion-refresher\" target=\"_blank\"><button class=\"btn example-btn\">\u5c1d\u8bd5\u4e00\u4e0b \u00bb<\/button><\/a><\/p>\n<p>\u6548\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><iframe frameborder=\"0\" height=\"400\" src=\"\/try\/demo_source\/ionic_ion-refresher.htm\"><\/iframe>\t\t\t<\/p><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">ionic \u4e0b\u62c9\u5237\u65b0 \u5728\u52a0\u8f7d\u65b0\u6570\u636e\u7684\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5b9e\u73b0\u4e0b\u62c9\u5237\u65b0\u6548\u679c\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a \u5b9e\u4f8b HT&hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=737\">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-737","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\/737","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=737"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/737\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}