{"id":32422,"date":"2024-11-25T11:52:04","date_gmt":"2024-11-25T03:52:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/32422\/"},"modified":"2024-11-25T11:52:04","modified_gmt":"2024-11-25T03:52:04","slug":"%e4%bd%bf%e7%94%a8%e7%a6%bb%e5%ad%90%e7%bb%84%e4%bb%b6%e6%9e%84%e5%bb%ba%ef%bc%9a%e5%88%9d%e5%ad%a6%e8%80%85%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/32422\/","title":{"rendered":"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357"},"content":{"rendered":"<\/p>\n<h2> <\/h2>\n<p>\u4ec0\u4e48\u662f\u79bb\u5b50\u6210\u5206\uff1f <\/p>\n<p>Ionic \u7ec4\u4ef6\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u662f\u8ba9\u60a8\u7684\u6df7\u5408\u5e94\u7528\u7a0b\u5e8f\u53d8\u5f97\u6829\u6829\u5982\u751f\u7684\u56e0\u7d20\u3002 \u7ec4\u4ef6\u4e3a\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7528\u6237\u754c\u9762\uff0cIonic \u6346\u7ed1\u4e86\u8d85\u8fc7 28 \u4e2a\u7ec4\u4ef6\u3002\u8fd9\u4e9b\u5c06\u5e2e\u52a9\u60a8\u4e3a\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u521b\u9020\u4ee4\u4eba\u60ca\u53f9\u7684\u7b2c\u4e00\u5370\u8c61\u3002 <\/p>\n<p>\u5f53\u7136\uff0c\u60a8\u65e0\u6cd5\u5728\u5355\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u6240\u6709\u8fd9 28 \u4e2a\u7ec4\u4ef6\u3002\u5982\u4f55\u51b3\u5b9a\u4f7f\u7528\u54ea\u4e9b\uff1f<\/p>\n<p>\u5e78\u8fd0\u7684\u662f\uff0c\u60a8\u51e0\u4e4e\u53ef\u4ee5\u5728\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u627e\u5230\u4e00\u4e9b\u7ec4\u4ef6\u3002\u5728\u91cc\u9762 \u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5411\u60a8\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528 Ionic \u7ec4\u4ef6\u6309\u94ae\u5bfc\u822a\u5230\u53e6\u4e00\u4e2a\u89c6\u56fe\u3002\u521b\u5efa\u6b64\u6309\u94ae\u6240\u9700\u7684\u53ea\u662f\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>&lt;button ion-button&gt;Navigate to Info&lt;\/button&gt;\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5df2\u7ecf\u4f7f\u7528\u4e86\u53ef\u7528\u7684 Ionic \u7ec4\u4ef6\u4e4b\u4e00\u3002\u8fd9\u5c31\u662f Ionic \u7684\u7f8e\u5999\u4e4b\u5904\uff1a\u6211\u4eec\u4e0d\u5fc5\u5173\u5fc3\u6309\u94ae\u5982\u4f55\u4f7f\u7528 \u7ec4\u4ef6\u6784\u5efa\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u7684\u662f\u5982\u4f55\u6b63\u786e\u4f7f\u7528\u76f8\u5173\u7ec4\u4ef6\u3002 <\/p>\n<h2> <\/h2>\n<p>\u4f55\u65f6\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\uff1f <\/p>\n<p>\u4f5c\u4e3a\u521d\u5b66\u8005\uff0c\u6211\u6000\u7591\u60a8\u5f00\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\u662f\u5426\u4f1a\u4e0d\u4f7f\u7528 Ionic \u7ec4\u4ef6\u3002\u60a8\u4e5f\u53ef\u4ee5\u5f00\u53d1\u81ea\u5df1\u7684\u81ea\u5b9a\u4e49\u7ec4\u4ef6\uff0c\u4f46\u8fd9\u662f\u53e6\u4e00\u5929\u5173\u4e8e Ionic \u548c Angular \u9ad8\u7ea7\u4f7f\u7528\u7684\u4e3b\u9898\u3002<\/p>\n<p>\u8bf4\u4e86\u8fd9\u4e48\u591a\uff0c\u6211\u4eec\u6765\u770b\u770b\u5982\u4f55\u4f7f\u7528 Ionic mobile \u4e2d<em>\u6700\u5e38\u7528<\/em>\u7684\u7ec4\u4ef6 \u5e94\u7528\uff1a<\/p>\n<h3>\u5e7b\u706f\u7247\u7ec4\u4ef6<\/h3>\n<p>\u5e7b\u706f\u7247\u7ec4\u4ef6\u901a\u5e38\u7528\u4f5c\u5e94\u7528\u7684\u4ecb\u7ecd\uff0c\u4e0b\u9762\u662f\u5176\u5e38\u89c1\u7528\u6cd5\u7684\u56fe\u7247\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/465\/014\/169347487033390.png\" class=\"aligncenter\" title=\"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\u63d2\u56fe\" alt=\"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\u63d2\u56fe\" \/><\/p>\n<h3> <em><\/em>\u5217\u8868\u7ec4\u4ef6<\/h3>\n<\/p>\n<p>\u5217\u8868\u662f\u60a8\u5728 Ionic \u5e94\u7528\u7a0b\u5e8f\u4e2d\u7ecf\u5e38\u4f7f\u7528\u7684\u7ec4\u4ef6\u4e4b\u4e00\u3002\u8bf7\u770b\u4e0b\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u793a\u4f8b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/465\/014\/169347487147599.png\" class=\"aligncenter\" title=\"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\u63d2\u56fe1\" alt=\"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\u63d2\u56fe1\" \/><\/p>\n<h2>\u5411\u60a8\u7684\u9879\u76ee\u6dfb\u52a0\u7ec4\u4ef6<em><\/p>\n<p><\/em> <\/h2>\n<p>\u73b0\u5728\u6211\u4eec\u5df2\u7ecf\u6536\u96c6\u4e86\u6709\u5173 Ionic \u7ec4\u4ef6\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u8ba9\u6211\u4eec\u5c1d\u8bd5\u5c06\u5176\u4e2d\u4e00\u4e9b\u201c\u6784\u5efa\u5757\u201d\u7ec4\u5408\u5728\u4e00\u8d77\u3002\u8ba9\u6211\u4eec\u7ee7\u7eed\u5411\u6211\u4eec\u7684 Ionic \u9879\u76ee\u6dfb\u52a0\u4e00\u4e9b\u7ec4\u4ef6\u3002<\/p>\n<p>\u6211\u4eec\u5c06\u4f7f\u7528\u5728\u4e0a\u4e00\u6559\u7a0b\u4e2d\u521b\u5efa\u7684\u9879\u76ee\uff0c\u5e76\u4e14\u7531\u4e8e<strong>\u4e3b\u9875<\/strong><strong>&nbsp;<\/strong>\u662f\u6211\u4eec\u5e94\u7528\u7684\u5165\u53e3\u70b9\uff0c\u56e0\u6b64\u6211\u4eec\u5c06\u5411<strong>\u4e3b\u9875\u6dfb\u52a0\u5e7b\u706f\u7247\u3002 html<\/strong> \u6587\u4ef6\u6765\u6dfb\u52a0\u6211\u4eec\u7684\u5e7b\u706f\u7247\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u5bfc\u822a\u5230 <strong>src\/pages\/home<\/strong> \u4e2d\u7684 <strong>home.html<\/strong> \u6587\u4ef6\u5e76\u5bf9\u6587\u4ef6\u8fdb\u884c\u4ee5\u4e0b\u66f4\u6539\uff1a<\/p>\n<pre>&lt;ion-header&gt;&lt;ion-navbar&gt;&lt;ion-title&gt;Welcome&lt;\/ion-title&gt;&lt;\/ion-navbar&gt;&lt;\/ion-header&gt;&lt;ion-content&gt;&lt;!-- Start Ionic Slides Component --&gt;&lt;ion-slides pager&gt;&lt;ion-slide style=\"background-color: green\"&gt;&lt;h2&gt;Welcome to Hello World&lt;\/h2&gt;\n      &lt;p&gt;Do some reading here and swipe left&lt;\/p&gt;\n    &lt;\/ion-slide&gt;&lt;ion-slide style=\"background-color: blue\"&gt;&lt;h2&gt;Ionic World&lt;\/h2&gt;\n      &lt;p&gt;Some more reading here and swipe left&lt;\/p&gt;\n      &lt;p&gt;Swiping right works too :)&lt;\/p&gt;\n    &lt;\/ion-slide&gt;&lt;ion-slide style=\"background-color: red\"&gt;&lt;h2&gt;Finish&lt;\/h2&gt;\n      &lt;p&gt;You can't swipe all day. See more of my app&lt;\/p&gt;\n      &lt;button ion-button&gt;Show me more!&lt;\/button&gt;\n    &lt;\/ion-slide&gt;&lt;\/ion-slides&gt;&lt;!-- End Ionic Slides Component --&gt;&lt;\/ion-content&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b63\u5982\u60a8\u5728\u4e0a\u9762\u770b\u5230\u7684\uff0c\u6211\u4eec\u4f7f\u7528\u5e7b\u706f\u7247\u7ec4\u4ef6\u6dfb\u52a0\u4e86\u4e09\u5f20\u5e7b\u706f\u7247\u3002\u8fd9\u662f\u5728  \u6b64\u5904\u5185\u5bb9&#8230;  \u5185\u3002\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u751f\u6210\u4efb\u610f\u6570\u91cf\u7684\u5e7b\u706f\u7247\uff0c\u4f46\u51fa\u4e8e\u672c\u793a\u4f8b\u7684\u76ee\u7684\uff0c\u6211\u4eec\u53ea\u521b\u5efa\u4e86\u4e09\u5f20\u3002<\/p>\n<p>\u6211\u4eec\u5c06\u4f7f\u7528\u53e6\u4e00\u4e2a Ionic \u7ec4\u4ef6\uff1a\u5217\u8868\u7ec4\u4ef6\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u7ee7\u7eed\u751f\u6210\u4e00\u4e2a\u6807\u9898\u4e3a<strong>\u6211\u7684\u5217\u8868<\/strong>\u7684\u65b0\u9875\u9762\u3002\u60a8\u5e94\u8be5\u8bb0\u4f4f\u5982\u4f55\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4ece\u4e0a\u4e00\u6559\u7a0b\u4e2d\u751f\u6210\u65b0\u9875\u9762\uff1aionic \u751f\u6210\u9875\u9762 my-list\u3002<\/p>\n<p>\u5c06\u65b0\u521b\u5efa\u7684\u9875\u9762\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f\u540e\uff0c\u8ba9\u6211\u4eec\u7ee7\u7eed\u5bfc\u822a\u5230 <strong>my-list.html<\/strong> \u5e76\u7f16\u8f91\u6587\u4ef6\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>&lt;ion-header&gt;&lt;ion-navbar&gt;&lt;ion-title&gt;My List&lt;\/ion-title&gt;&lt;\/ion-navbar&gt;&lt;\/ion-header&gt;&lt;ion-content&gt;&lt;!-- Start Ionic List Component --&gt;&lt;ion-list&gt;&lt;ion-item&gt;1&lt;\/ion-item&gt;&lt;ion-item&gt;2&lt;\/ion-item&gt;&lt;ion-item&gt;3&lt;\/ion-item&gt;&lt;\/ion-list&gt;&lt;!-- End Ionic List Component --&gt;&lt;\/ion-content&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5c06\u4e0a\u8ff0\u4ee3\u7801\u6dfb\u52a0\u5230\u60a8\u7684\u5e94\u7528\u540e\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u770b\u5230\u5305\u542b\u4e09\u4e2a\u9879\u76ee\u7684\u5217\u8868\u3002\u73b0\u5728\u5f88\u597d\uff0c\u4f46\u6211\u786e\u4fe1\u60a8\u5e0c\u671b\u5728\u6eda\u52a8\u5217\u8868\u65f6\u770b\u5230\u4e00\u4e9b\u5e26\u6709\u52a0\u901f\u548c\u51cf\u901f\u7684\u5e73\u6ed1\u6eda\u52a8\uff0c\u5bf9\u5427\uff1f\u55ef\uff0c\u8fd9\u5f88\u5bb9\u6613\u5b9e\u73b0\u2014\u2014\u6211\u4eec\u53ea\u9700\u8981\u4e00\u4e2a\u66f4\u5927\u7684\u5217\u8868\uff01<\/p>\n<p>\u8003\u8651 <strong>my-list.html <\/strong>\u6587\u4ef6\u4e2d\u7684\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>&lt;ion-header&gt;&lt;ion-navbar&gt;&lt;ion-title&gt;My List&lt;\/ion-title&gt;&lt;\/ion-navbar&gt;&lt;\/ion-header&gt;&lt;ion-content&gt;&lt;!-- Start Ionic List Component --&gt;&lt;ion-list&gt;&lt;ion-item&gt;1&lt;\/ion-item&gt;&lt;ion-item&gt;2&lt;\/ion-item&gt;&lt;ion-item&gt;3&lt;\/ion-item&gt;&lt;ion-item&gt;4&lt;\/ion-item&gt;&lt;ion-item&gt;5&lt;\/ion-item&gt;&lt;ion-item&gt;6&lt;\/ion-item&gt;&lt;ion-item&gt;7&lt;\/ion-item&gt;&lt;ion-item&gt;8&lt;\/ion-item&gt;&lt;ion-item&gt;9&lt;\/ion-item&gt;&lt;ion-item&gt;10&lt;\/ion-item&gt;&lt;ion-item&gt;11&lt;\/ion-item&gt;&lt;ion-item&gt;12&lt;\/ion-item&gt;&lt;ion-item&gt;13&lt;\/ion-item&gt;&lt;ion-item&gt;14&lt;\/ion-item&gt;&lt;ion-item&gt;15&lt;\/ion-item&gt;&lt;ion-item&gt;16&lt;\/ion-item&gt;&lt;ion-item&gt;17&lt;\/ion-item&gt;&lt;ion-item&gt;18&lt;\/ion-item&gt;&lt;ion-item&gt;19&lt;\/ion-item&gt;&lt;ion-item&gt;20&lt;\/ion-item&gt;&lt;\/ion-list&gt;&lt;!-- End Ionic List Component --&gt;&lt;\/ion-content&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u4e0a\u9762\u8f83\u957f\u7684\u5217\u8868\u66f4\u65b0\u6587\u4ef6\uff0c\u60a8\u5c06\u770b\u5230\u6eda\u52a8\u7684\u52a0\u901f\u548c\u51cf\u901f\u3002 <\/p>\n<p>\u73b0\u5728\uff0c\u8fd9\u662f\u5728\u6211\u4eec\u7684\u9879\u76ee\u4e2d\u521b\u5efa\u5217\u8868\u7684\u4e00\u79cd\u65b9\u6cd5\uff0c\u4f46\u5982\u679c\u6211\u4eec\u9700\u8981\u521b\u5efa\u5305\u542b\u66f4\u591a\u9879\u76ee\u7684\u5217\u8868\uff0c\u8fd9\u770b\u8d77\u6765\u4f1a\u5f88\u70e6\u4eba\u3002\u8fd9\u610f\u5473\u7740\u4e3a\u6bcf\u4e00\u4e2a\u90fd\u7f16\u5199  &#8230;content&#8230;  \u3002\u5e78\u8fd0\u7684\u662f\uff0c\u6709\u66f4\u597d\u7684\u65b9\u6cd5\uff0c\u5373\u4f7f\u4f5c\u4e3a\u521d\u5b66\u8005\uff0c\u5728\u5904\u7406\u5927\u91cf\u6570\u636e\u548c\u4fe1\u606f\u65f6\u4e5f\u5e94\u8be5\u5c1d\u8bd5\u9075\u5faa\u76f8\u540c\u7684\u65b9\u6cd5\u3002 <\/p>\n<p>\u5b98\u65b9 Ionic \u6587\u6863\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\u7528\u9879\u76ee\u586b\u5145\u5217\u8868\uff1a<\/p>\n<pre>&lt;ion-header&gt;&lt;ion-navbar&gt;&lt;ion-title&gt;My List&lt;\/ion-title&gt;&lt;\/ion-navbar&gt;&lt;\/ion-header&gt;&lt;ion-content&gt;&lt;!-- Start Ionic List Component --&gt;&lt;ion-list&gt;&lt;button ion-item item of items&gt;\n        {{ item }}\n        &lt;\/button&gt;  \n    &lt;\/ion-list&gt;&lt;!-- End Ionic List Component --&gt;&lt;\/ion-content&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e0a\u9762\u4ee3\u7801\u7684\u795e\u5947\u4e4b\u5904\u5728\u4e8e\u4f7f\u7528\u4e86 Angular \u6307\u4ee4\uff1a*ngFor\u3002\u6211\u4eec\u4e0d\u4f1a\u66f4\u6df1\u5165\u5730\u63a2\u8ba8\u8be5\u6307\u4ee4\u7684\u542b\u4e49\u53ca\u5176\u7528\u9014\uff0c\u4f46\u7b80\u800c\u8a00\u4e4b\uff0c\u5b83\u4f1a\u8fed\u4ee3\u6570\u636e\u96c6\u5408\uff0c\u4f7f\u6211\u4eec\u80fd\u591f\u5728\u5e94\u7528\u4e2d\u6784\u5efa\u6570\u636e\u5448\u73b0\u5217\u8868\u548c\u8868\u683c\u3002 items \u662f\u4e00\u4e2a\u5305\u542b\u6211\u4eec\u7684\u6570\u636e\u7684\u53d8\u91cf\uff0c\u5e76\u4e14 item \u586b\u5145\u6709\u8be5\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u9879\u76ee\u3002\u5982\u679c\u60a8\u60f3\u4e86\u89e3\u6709\u5173\u8be5\u6307\u4ee4\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b Angular \u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u6709\u4e86\u8fd9\u4e9b\u77e5\u8bc6\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528 *ngFor \u6307\u4ee4\u6765\u6539\u8fdb\u6211\u4eec\u7684\u9879\u76ee\u3002\u7f16\u8f91 <strong>my-list.html<\/strong> \u6587\u4ef6\u4ee5\u53cd\u6620\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre>&lt;ion-header&gt;&lt;ion-navbar&gt;&lt;ion-title&gt;My List&lt;\/ion-title&gt;&lt;\/ion-navbar&gt;&lt;\/ion-header&gt;&lt;ion-content&gt;&lt;!-- Start Ionic List Component --&gt;&lt;ion-list&gt;&lt;ion-item item of items&gt;&lt;ion-avatar item-start&gt;&lt;img  src=\"%7B%7Bitem.image%7D%7D\" alt=\"\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\" &gt;&lt;\/ion-avatar&gt;&lt;h2&gt;{{item.title}}&lt;\/h2&gt;\n        &lt;p&gt;{{item.subTitle}}&lt;\/p&gt;\n      &lt;\/ion-item&gt;&lt;\/ion-list&gt;&lt;!-- End Ionic List Component --&gt;&lt;\/ion-content&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u91cc\u53d1\u751f\u4e86\u5f88\u591a\u4e8b\u60c5\u3002  \u5305\u542b\u4e00\u7cfb\u5217  \u7ec4\u4ef6\u3002 item-start \u5c5e\u6027\u610f\u5473\u7740\u5934\u50cf\u5c06\u4e0e\u53f3\u4fa7\u5bf9\u9f50\u3002\u6bcf\u4e2a\u5217\u8868\u9879\u8fd8\u5305\u542b\u4e00\u4e2a\u6807\u9898\u6807\u7b7e (  <\/p>\n<h2>) \u548c\u4e00\u4e2a\u6bb5\u843d\u6807\u7b7e (<\/h2>\n<p>)\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u57fa\u672c\u4e0a\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5728\u5217\u8868\u7ec4\u4ef6\u5185\u6dfb\u52a0\u5176\u4ed6\u7ec4\u4ef6\u3002\u770b\u770b Ionic \u6587\u6863\u4e2d\u7684\u5361\u7247\u5217\u8868\u793a\u4f8b\u4e2d\u5982\u4f55\u5b9e\u73b0\u6b64\u76ee\u7684\u7684\u53e6\u4e00\u4e2a\u5f88\u597d\u7684\u793a\u4f8b\u3002\u540c\u6837\uff0c\u5728\u8be5\u793a\u4f8b\u4e2d\u5b9e\u73b0 *ngFor \u5c06\u4f1a\u5e26\u6765\u597d\u5904\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u56de\u5230\u6211\u4eec\u7684\u4ee3\u7801\uff0c<strong>items<\/strong> \u4e2d\u7684 <strong>item<\/strong> \u5305\u542b <strong>title<\/strong>\u3001<strong>subTitle<\/strong> \u548c <strong> &gt;\u56fe\u50cf<\/strong>\u3002\u8ba9\u6211\u4eec\u7ee7\u7eed\u5728 <strong>my-list.ts<\/strong> \u6587\u4ef6\u4e2d\u8fdb\u884c\u4ee5\u4e0b\u66f4\u6539\uff1a<\/p>\n<pre>export class MyListPage {\n  items: any;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    this.items = [\n      {\n        title: 'Item 1', \n        subTitle: 'Sub title 1', \n        image: 'https:\/\/placehold.it\/50'\n      },\n      {\n        title: 'Item 2', \n        subTitle: 'Sub title 2', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      {\n        title: 'Item 3', \n        subTitle: 'Sub title 3', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      {\n        title: 'Item 4', \n        subTitle: 'Sub title 4', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      {\n        title: 'item 5', \n        subTitle: 'Sub title 5', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      title: 'item 6', \n        subTitle: 'Sub title 6', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      title: 'item 7', \n        subTitle: 'Sub title 7', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      title: 'item 8', \n        subTitle: 'Sub title 8', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      title: 'item 9', \n        subTitle: 'Sub title 9', \n        image: 'http:\/\/placehold.it\/50'\n      },\n      title: 'item 10', \n        subTitle: 'Sub title 10', \n        image: 'http:\/\/placehold.it\/50'\n      }]\n    }\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6b63\u5728\u6784\u9020\u51fd\u6570\u6587\u4ef6 <strong>my-list.ts<\/strong> \u4e2d\u586b\u5145\u9879\u76ee\u3002\u8fd9\u4e9b\u5c06\u663e\u793a\u5728\u6211\u4eec\u7684\u9875\u9762\u6a21\u677f\uff08<strong>my-list.html<\/strong> \u6587\u4ef6\uff09\u4e2d\u3002\u8be5\u6570\u636e\u53ef\u4ee5\u6765\u81ea\u4efb\u4f55\u6765\u6e90\uff1a\u672c\u5730\u6570\u636e\u5e93\u3001\u7528\u6237\u8f93\u5165\u6216\u5916\u90e8 REST API\u3002\u4f46\u4e3a\u4e86\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u6211\u4eec\u53ea\u662f\u5bf9\u6570\u636e\u8fdb\u884c\u786c\u7f16\u7801\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<\/p>\n<p>\u867d\u7136\u6211\u4eec\u6ca1\u6709\u6db5\u76d6\u6240\u6709 Ionic \u7ec4\u4ef6\uff0c\u4f46\u76f8\u540c\u7684\u539f\u5219\u4e5f\u9002\u7528\u4e8e\u5176\u4ed6\u7ec4\u4ef6\u3002\u6211\u60f3\u9f13\u52b1\u60a8\u5c1d\u8bd5\u5e76\u6d4b\u8bd5\u5176\u4f59\u7ec4\u4ef6\u5e76\u5f00\u59cb\u719f\u6089\u5b83\u4eec\u7684\u4f7f\u7528\u3002\u6b63\u5982\u6211\u5728\u5f00\u5934\u63d0\u5230\u7684\uff0c\u8fd9\u4e9b\u7ec4\u4ef6\u5c06\u6210\u4e3a\u60a8\u5c06\u6784\u5efa\u7684\u6bcf\u4e2a Ionic \u5e94\u7528\u7a0b\u5e8f\u7684\u6784\u5efa\u5757\uff01<\/p>\n<\/p>\n<p>\u540c\u65f6\uff0c\u8bf7\u67e5\u770b\u6211\u4eec\u5173\u4e8e Ionic \u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u5176\u4ed6\u4e00\u4e9b\u5e16\u5b50\u3002<\/p>\n<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\u6784\u5efa\uff1a\u521d\u5b66\u8005\u6307\u5357\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662f\u79bb\u5b50\u6210\u5206\uff1f Ionic \u7ec4\u4ef6\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u662f\u8ba9\u60a8\u7684\u6df7\u5408\u5e94\u7528\u7a0b\u5e8f\u53d8\u5f97\u6829\u6829\u5982\u751f\u7684\u56e0\u7d20\u3002 \u7ec4\u4ef6\u4e3a\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7528\u6237\u754c\u9762\uff0cIonic \u6346\u7ed1\u4e86\u8d85\u8fc7 28 \u4e2a\u7ec4\u4ef6\u3002\u8fd9\u4e9b\u5c06\u5e2e\u52a9\u60a8\u4e3a\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u521b\u9020\u4ee4\u4eba\u60ca\u53f9\u7684\u7b2c\u4e00\u5370\u8c61\u3002 \u5f53\u7136\uff0c\u60a8\u65e0\u6cd5\u5728\u5355\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u6240\u6709\u8fd9 28 \u4e2a\u7ec4\u4ef6\u3002\u5982\u4f55\u51b3\u5b9a\u4f7f\u7528\u54ea\u4e9b\uff1f \u5e78\u8fd0\u7684\u662f\uff0c\u60a8\u51e0\u4e4e\u53ef\u4ee5\u5728\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u627e\u5230\u4e00\u4e9b\u7ec4\u4ef6\u3002\u5728\u91cc\u9762 \u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5411\u60a8\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528 Ionic \u7ec4\u4ef6\u6309\u94ae\u5bfc\u822a\u5230\u53e6\u4e00\u4e2a\u89c6\u56fe\u3002\u521b\u5efa\u6b64\u6309\u94ae\u6240\u9700\u7684\u53ea\u662f\u4ee5\u4e0b\u4ee3\u7801\uff1a &lt;button ion-button&gt;Navigate to Info&lt;\/button&gt; \u767b\u5f55\u540e\u590d\u5236 \u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5df2\u7ecf\u4f7f\u7528\u4e86\u53ef\u7528\u7684 Ionic \u7ec4\u4ef6\u4e4b\u4e00\u3002\u8fd9\u5c31\u662f Ionic \u7684\u7f8e\u5999\u4e4b\u5904\uff1a\u6211\u4eec\u4e0d\u5fc5\u5173\u5fc3\u6309\u94ae\u5982\u4f55\u4f7f\u7528 \u7ec4\u4ef6\u6784\u5efa\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u7684\u662f\u5982\u4f55\u6b63\u786e\u4f7f\u7528\u76f8\u5173\u7ec4\u4ef6\u3002 \u4f55\u65f6\u4f7f\u7528\u79bb\u5b50\u7ec4\u4ef6\uff1f \u4f5c\u4e3a\u521d\u5b66\u8005\uff0c\u6211\u6000\u7591\u60a8\u5f00\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\u662f\u5426\u4f1a\u4e0d\u4f7f\u7528 Ionic \u7ec4\u4ef6\u3002\u60a8\u4e5f\u53ef\u4ee5\u5f00\u53d1\u81ea\u5df1\u7684\u81ea\u5b9a\u4e49\u7ec4\u4ef6\uff0c\u4f46\u8fd9\u662f\u53e6\u4e00\u5929\u5173\u4e8e Ionic \u548c Angular \u9ad8\u7ea7\u4f7f\u7528\u7684\u4e3b\u9898\u3002 \u8bf4\u4e86\u8fd9\u4e48\u591a\uff0c\u6211\u4eec\u6765\u770b\u770b\u5982\u4f55\u4f7f\u7528 Ionic mobile \u4e2d\u6700\u5e38\u7528\u7684\u7ec4\u4ef6 \u5e94\u7528\uff1a \u5e7b\u706f\u7247\u7ec4\u4ef6 \u5e7b\u706f\u7247\u7ec4\u4ef6\u901a\u5e38\u7528\u4f5c\u5e94\u7528\u7684\u4ecb\u7ecd\uff0c\u4e0b\u9762\u662f\u5176\u5e38\u89c1\u7528\u6cd5\u7684\u56fe\u7247\uff1a \u5217\u8868\u7ec4\u4ef6 \u5217\u8868\u662f\u60a8\u5728 Ionic \u5e94\u7528\u7a0b\u5e8f\u4e2d\u7ecf\u5e38\u4f7f\u7528\u7684\u7ec4\u4ef6\u4e4b\u4e00\u3002\u8bf7\u770b\u4e0b\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u793a\u4f8b\u3002 \u5411\u60a8\u7684\u9879\u76ee\u6dfb\u52a0\u7ec4\u4ef6 \u73b0\u5728\u6211\u4eec\u5df2\u7ecf\u6536\u96c6\u4e86\u6709\u5173 Ionic \u7ec4\u4ef6\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u8ba9\u6211\u4eec\u5c1d\u8bd5\u5c06\u5176\u4e2d\u4e00\u4e9b\u201c\u6784\u5efa\u5757\u201d\u7ec4\u5408\u5728\u4e00\u8d77\u3002\u8ba9\u6211\u4eec\u7ee7\u7eed\u5411\u6211\u4eec\u7684 Ionic \u9879\u76ee\u6dfb\u52a0\u4e00\u4e9b\u7ec4\u4ef6\u3002 \u6211\u4eec\u5c06\u4f7f\u7528\u5728\u4e0a\u4e00\u6559\u7a0b\u4e2d\u521b\u5efa\u7684\u9879\u76ee\uff0c\u5e76\u4e14\u7531\u4e8e\u4e3b\u9875&nbsp;\u662f\u6211\u4eec\u5e94\u7528\u7684\u5165\u53e3\u70b9\uff0c\u56e0\u6b64\u6211\u4eec\u5c06\u5411\u4e3b\u9875\u6dfb\u52a0\u5e7b\u706f\u7247\u3002 html \u6587\u4ef6\u6765\u6dfb\u52a0\u6211\u4eec\u7684\u5e7b\u706f\u7247\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u5bfc\u822a\u5230 src\/pages\/home \u4e2d\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-32422","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=32422"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32422\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=32422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=32422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=32422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}