-
-
Save daykin/23ca2d41527341348dff to your computer and use it in GitHub Desktop.
Knockout API Tutorial - Sample 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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