Skip to content

Instantly share code, notes, and snippets.

@daykin
Forked from eppleton/Todo.java
Last active November 30, 2015 17:43
Show Gist options
  • Save daykin/23ca2d41527341348dff to your computer and use it in GitHub Desktop.
Save daykin/23ca2d41527341348dff to your computer and use it in GitHub Desktop.
Knockout API Tutorial - Sample 1
<html>
<head>
<title>PersonView</title>
</head>
<body>
<ol data-bind="foreach: vtypes">
<li><span data-bind="text: channelName"></span> has value
<span data-bind="text: value"></span>.</li>
</ol>
</body>
</html>
package com.dukescript.tutorial;
import net.java.html.json.Model;
import net.java.html.json.Property;
@Model(className = "VStringList",properties = {
@Property(name = "vsname", type = VString.class, array = true) //replace string with wrapper?
})
public class ViewModel {
static {
@Model(className = "VString",properties = {
@Property(name = "channelName", type = String.class) //replace string with wrapper?
@Property(name = "value", type = String.class)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment