{"id":1987,"date":"2017-09-19T14:17:06","date_gmt":"2017-09-19T06:17:06","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1987"},"modified":"2017-09-19T14:17:06","modified_gmt":"2017-09-19T06:17:06","slug":"angularjs-%e5%ae%9e%e7%8e%b0%e5%8d%a1%e7%89%87%e5%bc%8f%e5%b8%83%e5%b1%80%ef%bc%88%e8%b4%ba%e5%8d%a1%e5%88%b6%e4%bd%9c99dh%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1987","title":{"rendered":"AngularJs \u5b9e\u73b0\u5361\u7247\u5f0f\u5e03\u5c40\uff08\u8d3a\u5361\u5236\u4f5c99dh\uff09"},"content":{"rendered":"<p>\n\t\u672c\u6587\u4ecb\u7ecd\u4f7f\u7528 Angularjs \u5b9e\u73b0\u5361\u7247\u5f0f\u5e03\u5c40\uff08\u8d3a\u5361\u5236\u4f5c99dh\uff09\u3002\u5361\u7247\u5f0f\u5e03\u5c40\u53c8\u79f0\u4e3a\u7011\u5e03\u6d41\u5e03\u5c40\uff0c\u6216\u8005\u4e5f\u79f0\u4e3a\u8d3a\u5361\u5f0f\u5e03\u5c40\u3002\n<\/p>\n<p>\n\t\u8d3a\u5361\u5236\u4f5c99dh\u53ea\u662f\u4e00\u4e2ademo\uff0c\u6211\u8fd9\u91cc\u5c31\u4e0d\u91cd\u70b9\u4ecb\u7ecd\u3002\u672c\u6587\u7684demo\u4e3b\u8981\u662f\u501f\u52a9 <a href=\"https:\/\/www.xttblog.com\/?tag=angular-waterfall\" name=\"angular-waterfall\" target=\"_blank\" title=\"angular-waterfall\">angular-waterfall<\/a> \u63d2\u4ef6\u6765\u5b9e\u73b0\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\u8d3a\u5361\u5236\u4f5c99dh\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/1496816127280340.png\" style=\"width: 410px;height: 240px\" \/>\n<\/p>\n<p>\n\t\u4e0a\u56fe\u5c31\u662f\u672c\u6587\u5c06\u8981\u5b9e\u73b0\u7684demo\u7684\u6548\u679c\u3002\n<\/p>\n<p>\n\t\u9605\u8bfb\u8fc7\u6211\u535a\u5ba2\u7684\u670b\u53cb\u53ef\u80fd\u77e5\u9053\uff0c\u6211\u524d\u9762\u6709\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd&nbsp;<a href=\"https:\/\/www.xttblog.com\/?p=1560\" name=\"\u4f7f\u7528\u7011\u5e03\u6d41\u63d2\u4ef6 Masonry \u8fdb\u884c\u7011\u5e03\u6d41\u5e03\u5c40\" target=\"_blank\" title=\"\u4f7f\u7528\u7011\u5e03\u6d41\u63d2\u4ef6 Masonry \u8fdb\u884c\u7011\u5e03\u6d41\u5e03\u5c40\">masonry.js<\/a>\uff0c\u8be5\u63d2\u4ef6\u662f\u4e00\u6b3e\u57fa\u4e8e jQuery \u7684\u63d2\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u5361\u7247\u5f0f\u5e03\u5c40\uff08\uff09\u3002\n<\/p>\n<p>\n\t<a href=\"https:\/\/github.com\/zedwang\/angular-waterfall\" name=\"angular-waterfall\" target=\"_blank\" title=\"angular-waterfall\">angular-waterfull.js<\/a> \u53ef\u4ee5\u5728 github \u4e0a\u4e0b\u8f7d\u5e76\u9605\u8bfb\u76f8\u5173\u7528\u6cd5\u3002\n<\/p>\n<p>\n\tangular-waterfall\u662f\u4e00\u4e2a\u5b9a\u5217\u81ea\u9002\u5e94\u7011\u5e03\u6d41\u6307\u4ee4\u3002\u5b83\u4e3b\u8981\u6709\u4e0b\u9762\u4e24\u4e2a\u5c5e\u6027\uff1a\n<\/p>\n<ul>\n<li>\n\t\tcontentWidth(optional) \u5916\u5c42\u5bb9\u5668\u5bbd\u5ea6\uff0c\u4e0d\u8bbe\u5219auto\n\t<\/li>\n<li>\n\t\tcols(optional) \u6307\u5b9a\u663e\u793a\u5217\u6570\uff0c\u9ed8\u8ba46\n\t<\/li>\n<\/ul>\n<h2>\n\tangular-waterfall\u7528\u6cd5<br \/>\n<\/h2>\n<p>\n\t\u5f15\u5165js\u6587\u4ef6\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;js\/angular.min.js&quot;&gt;&lt;\/script&gt;  \r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;js\/angular-waterfall.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\n\t\u7136\u540e\uff0c\u6a21\u5757\u6ce8\u5165\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\nangular.module(&#039;angularWaterfallApp&#039;,[\"ngWaterfall\",\"ui.router\"]);\r\n\/\/\u6ce8\u610f\uff0c\u8fd9\u4e2a\u5730\u65b9\u4e2d\u62ec\u53f7\u91cc\u9762\u7684ui.router\u662f\u53e6\u4e00\u4e2ajs\uff08angular-ui-router.min.js\uff09\u6587\u4ef6\u91cc\u7684\uff0c\u5982\u679c\u4e0d\u9700\u8981\u8fd9\u4e2ajs\u6587\u4ef6\u53ef\u4ee5\u53bb\u6389ui.router\r\nangular.module(&#039;angularWaterfallApp&#039;,[\"ngWaterfall\",\"ui.router\"]) ;<\/pre>\n<p>\n\t\u7011\u5e03\u6d41\u5e03\u5c40\u6a21\u677f\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;ul class=&quot;waterfall-list&quot; ng-waterfall cols=&quot;6&quot;&gt;\r\n\t&lt;li ng-repeat=&quot;image in images&quot; repeat-finished&gt;\r\n\t\t&lt;div class=&quot;data-block&quot;&gt;\r\n\t\t\t&lt;img src=&quot;{{image.url}}&quot; alt=&quot;{{image.summary}}&quot;\/&gt;\r\n\t\t\t&lt;p&gt;{{image.title}}&lt;\/p&gt;\r\n\t\t\t&lt;p&gt;{{image.summary}}&lt;\/p&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/li&gt;\r\n\t&lt;div class=&quot;loadMore&quot; ng-if=&quot;loadMore&quot; ng-infinite-scroll ng-click=&quot;loadMoreData()&quot;&gt;{{text}}&lt;\/div&gt;\r\n&lt;\/ul&gt;<\/pre>\n<p>\n\tcontroller \u4ee3\u7801\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\npage++;\r\n$scope.$on(&quot;waterfall:loadMore&quot;,function(){\/\/\u6eda\u52a8\u81ea\u52a8\u586b\u5145\u4e8b\u4ef6\r\n\t$scope.loadMoreData();\r\n})<\/pre>\n<p>\n\t\u5982\u679c\u4f60\u9700\u8981\u7528\u6eda\u8f6e\u6eda\u5230\u5e95\u90e8\u52a0\u8f7d\uff0c\u53ef\u4ee5\u7528\u4e0b\u9762\u8fd9\u4e2a\u65b9\u6cd5\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;div class=&quot;loadMore&quot; ng-if=&quot;loadMore&quot; ng-infinite-scroll ng-click=&quot;loadMoreData()&quot;&gt;{{text}}&lt;\/div&gt; <\/pre>\n<p>\n\t\u6700\u7ec8\u8fd0\u884c\u6548\u679c\uff0c\u5c31\u662f\u6211\u4eec\u4e0a\u56fe\u4e2d\u7684\u6837\u5b50\u3002\n<\/p>\n<h2>\n\t\u63a8\u8350\u9605\u8bfb<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/www.xttblog.com\/?p=1560\" name=\"\u4f7f\u7528\u7011\u5e03\u6d41\u63d2\u4ef6 Masonry \u8fdb\u884c\u7011\u5e03\u6d41\u5e03\u5c40\" target=\"_blank\" title=\"\u4f7f\u7528\u7011\u5e03\u6d41\u63d2\u4ef6 Masonry \u8fdb\u884c\u7011\u5e03\u6d41\u5e03\u5c40\">\u4f7f\u7528\u7011\u5e03\u6d41\u63d2\u4ef6 Masonry \u8fdb\u884c\u7011\u5e03\u6d41\u5e03\u5c40<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/www.xttblog.com\/?p=220\" name=\"HTML5\u4eff\u7d20\u6750\u7f51\u7684\u7011\u5e03\u6d41\u8bbe\u8ba1\" target=\"_blank\" title=\"HTML5\u4eff\u7d20\u6750\u7f51\u7684\u7011\u5e03\u6d41\u8bbe\u8ba1\">HTML5\u4eff\u7d20\u6750\u7f51\u7684\u7011\u5e03\u6d41\u8bbe\u8ba1<\/a>\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1987\">AngularJs \u5b9e\u73b0\u5361\u7247\u5f0f\u5e03\u5c40\uff08\u8d3a\u5361\u5236\u4f5c99dh\uff09<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u4f7f\u7528 Angularjs \u5b9e\u73b0\u5361\u7247\u5f0f\u5e03\u5c40\uff08\u8d3a\u5361\u5236\u4f5c99dh\uff09\u3002\u5361\u7247\u5f0f\u5e03\u5c40\u53c8\u79f0\u4e3a\u7011\u5e03\u6d41\u5e03\u5c40\uff0c\u6216\u8005\u4e5f\u79f0\u4e3a\u8d3a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1502,1298,1503,46,1299],"class_list":["post-1987","post","type-post","status-publish","format-standard","hentry","category-html5","tag-angular-waterfall","tag-masonry","tag-1503","tag-46","tag-1299"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1987"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1987\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1987\/revisions\/1988"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}