Skip to content

Instantly share code, notes, and snippets.

@gaga5lala
Last active August 29, 2015 14:12
Show Gist options
  • Save gaga5lala/fb991793d517a008409e to your computer and use it in GitHub Desktop.
Save gaga5lala/fb991793d517a008409e to your computer and use it in GitHub Desktop.
COIMOTION LIST
-blocks
--modules
---list
----list.js(需要嗎)
--views
---list
----list.html
----listCtrl.js
<div>
<% for (var i in list) {
var item = list[i];
%>
<p>item.title</p> //標題
<% } %>
</div>
{"errCode":0,"message":"Ok","value":{"list":[{"ngID":72328,"isPublic":0,"createTime":"2014-12-29T06:56:42.000Z","cnID":36093
,"title":"再一篇","summary":null,"mdTime":"2014-12-29T06:56:42.000Z","version":0,"iconURI":null,"dspName":null},
{"ngID":72326,"isPublic":0,"createTime":"2014-12-29T06:53:49.000Z","cnID":36091
,"title":"我的第一篇文章","summary":null,"mdTime":"2014-12-29T06:53:49.000Z","version":0,"iconURI":null,"dspName":null}]
,"entries":2}}
ctrl.startup = function(){
$.post('/list.wsj', function(data) {
if (data.errCode)
alert( data.message );
else
alert(data.message );
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment