Created
July 29, 2017 17:30
-
-
Save JeroenVinke/4442479dd7c88449a844ef0a17175f57 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
bind(ctx, overrideCtx) { | |
this.widgetBase.useParentCtx(overrideCtx); | |
if (this.kWidget) { | |
// this had to be kValue and not value | |
this.kWidget.value(this.kValue); | |
} | |
} |
This file contains hidden or 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
<template> | |
<button click.delegate="create()">New Person</button> | |
<table with.bind="person"> | |
<tr> | |
<td>Name</td> | |
<td><input type="text" value.two-way="Name" /></td> | |
</tr> | |
<tr> | |
<td>Age</td> | |
<td> | |
<input type="text" value.two-way="Age" /> | |
</td> | |
</tr> | |
<tr> | |
<td>Age in Combobox</td> | |
<td> | |
<ak-combobox k-value.two-way="Age"> | |
</ak-combobox> | |
</td> | |
</tr> | |
</table> | |
</template> |
This file contains hidden or 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
export class Test { | |
person = null; | |
create() { | |
this.person = new Person(); | |
this.person.Age = '' + Math.random() * 100; | |
this.person.Name = "Name"; | |
} | |
} | |
export class Person { | |
Name = undefined; | |
Age = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment