{"id":739,"date":"2018-02-25T20:33:17","date_gmt":"2018-02-25T12:33:17","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/25\/ionic-%e5%8d%95%e9%80%89%e6%a1%86%e6%93%8d%e4%bd%9c\/"},"modified":"2018-02-25T20:33:17","modified_gmt":"2018-02-25T12:33:17","slug":"ionic-%e5%8d%95%e9%80%89%e6%a1%86%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=739","title":{"rendered":"ionic \u5355\u9009\u6846\u64cd\u4f5c"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>ionic \u5355\u9009\u6846\u64cd\u4f5c<\/h1>\n<p>\u5b9e\u4f8b\u4e2d\uff0c\u6839\u636e\u9009\u4e2d\u7684\u4e0d\u540c\u9009\u9879\uff0c\u663e\u793a\u4e0d\u540c\u7684\u503c\u3002<\/p>\n<h3>HTML \u4ee3\u7801<\/h3>\n<pre>\n&lt;ion-header-bar class=\"bar-positive\"&gt;\n  &lt;h1 class=\"title\"&gt;\u5f53\u9009\u6309\u94ae&lt;\/h1&gt;\n&lt;\/ion-header-bar&gt;\n         \n&lt;ion-content&gt;\n  \n  &lt;div class=\"list\"&gt;\n    \n    &lt;div class=\"item item-divider\"&gt; \n      \u9009\u53d6\u7684\u503c\u4e3a: {{ data.clientSide }}\n    &lt;\/div&gt;\n    \n    &lt;ion-radio ng-repeat=\"item in clientSideList\"\n               ng-value=\"item.value\"\n               ng-model=\"data.clientSide\"&gt;\n      {{ item.text }}\n    &lt;\/ion-radio&gt;\n    \n    &lt;div class=\"item item-divider\"&gt;\n      Serverside, Selected Value: {{ data.serverSide }}\n    &lt;\/div&gt;\n    \n    &lt;ion-radio ng-repeat=\"item in serverSideList\"\n               ng-value=\"item.value\"\n               ng-model=\"data.serverSide\"\n               ng-change=\"serverSideChange(item)\"\n               name=\"server-side\"&gt;\n      {{ item.text }}\n    &lt;\/ion-radio&gt;\n    \n  &lt;\/div&gt;\n  \n&lt;\/ion-content&gt;\n<\/pre>\n<h3>JavaScript \u4ee3\u7801<\/h3>\n<pre>\nangular.module('ionicApp', ['ionic'])\n\n.controller('MainCtrl', function($scope) {\n\n  $scope.clientSideList = [\n    { text: \"Backbone\", value: \"bb\" },\n    { text: \"Angular\", value: \"ng\" },\n    { text: \"Ember\", value: \"em\" },\n    { text: \"Knockout\", value: \"ko\" }\n  ];\n\n  $scope.serverSideList = [\n    { text: \"Go\", value: \"go\" },\n    { text: \"Python\", value: \"py\" },\n    { text: \"Ruby\", value: \"rb\" },\n    { text: \"Java\", value: \"jv\" }\n  ];\n  \n  $scope.data = {\n    clientSide: 'ng'\n  };\n  \n  $scope.serverSideChange = function(item) {\n    console.log(\"Selected Serverside, text:\", item.text, \"value:\", item.value);\n  };\n  \n});\n<\/pre>\n<p>css \u4ee3\u7801\uff1a<\/p>\n<pre>\nbody {\n  cursor: url('http:\/\/www.runoob.com\/try\/demo_source\/finger.png'), auto;\n}\n<\/pre>\n<p><a href=\"\/try\/tryit.php?filename=ionic_ion-radio\" 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-radio.htm\"><\/iframe>\t\t\t<\/p><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">ionic \u5355\u9009\u6846\u64cd\u4f5c \u5b9e\u4f8b\u4e2d\uff0c\u6839\u636e\u9009\u4e2d\u7684\u4e0d\u540c\u9009\u9879\uff0c\u663e\u793a\u4e0d\u540c\u7684\u503c\u3002 HTML \u4ee3\u7801 &#038;lt&hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=739\">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-739","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\/739","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=739"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}