Advertisement
aokmikey

Untitled

Jun 11th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1.     load: (vnode) => {
  2.         m.request({method: "GET", url: apiHost+"game/"+vnode.attrs.game+"/"+vnode.attrs.catagory+"/"+vnode.attrs.func}).then( (res) => {
  3.             vnode.state.doc = res
  4.             console.log(vnode.state.doc)
  5.         });
  6.     },
  7.     view: (vnode) => {
  8.         return [
  9.             m("div", {class: "list"}, vnode.state.functions.length ? vnode.state.functions.map((func) => {
  10.                 return m("ul", func.pretty, func.children.map(function( child ) {
  11.                     return m("li", m("a", {href: "#!/"+vnode.attrs.game+"/"+func.name+"/"+child.name}, child.name))
  12.                 }))
  13.             }) : null),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement