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
// Click on the fruit name toggles the fruit's edible property |
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
// Event callbacks don't need a refresh, they trigger one automatically | |
log(); |
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
// The model is accessible with the name `vscope` | |
// | |
// `json` has also methods to handle arrays | |
// - push | |
// - splice | |
// - shift | |
json.push(vscope.things, "Mangos"); | |
log(); | |
hsp.refresh(); |
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
// The model is accessible with the name `vscope` | |
// To refresh a template, call `refresh()` | |
json.set(vscope, "message", 'Have a nice refresh.'); | |
log(); | |
hsp.refresh(); |
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
// In this console you can interact with the model | |
// without causing a recompilation of the template | |
// | |
// The model is accessible with the name `vscope` | |
// You can display it calling `log()` | |
// You can interact with it using the `json` helper | |
// To refresh a template, call `refresh()` | |
// | |
// Try for instance the following code | |
// Hint: Press Ctrl+Space to execute it |
NewerOlder