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> | |
| <require from="./line"></require> | |
| <button click.delegate="update()">update</button> | |
| <svg width="100" height="100"> | |
| <line | |
| repeat.for="value of values" | |
| value.bind="value" | |
| label.bind="labels[value]" | |
| ></line> | |
| </svg> |
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> | |
| <input value.bind="message"> | |
| <br> | |
| <p>Message: ${message}</p> | |
| <button click.trigger="tryChange()">jQuery('input').val('test').trigger('change')</button> | |
| <button click.trigger="tryInput()">jQuery('input').val('test2').trigger('input')</button> | |
| </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
| <template> | |
| <require from="./child"></require> | |
| <child if.bind="stage == 1">first</child> | |
| <child if.bind="stage == 2">second</child> | |
| <button click.delegate="stage = 1" disabled.bind="stage == 1">Previous</button> | |
| <button click.delegate="stage = 2" disabled.bind="stage == 2">Next</button> | |
| </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
| <template> | |
| <require from="./line-chart"></require> | |
| <button click.trigger="doAgain()">New data</button> | |
| <line-chart charges.bind="charges"></line-chart> | |
| </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
| .nav-bar { | |
| margin: 1rem; | |
| } | |
| .nav-bar a { | |
| margin: .5rem 1rem; | |
| padding: .5rem; | |
| font-size: 1.2rem; | |
| } | |
| .nav-bar a.active { |
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> | |
| <require from="./my-comp"></require> | |
| <h4 as-element="my-comp"></h4> | |
| <h4 as-element="compose" view-model="./my-comp"></h4> | |
| </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
| <template> | |
| <require from="./my-comp"></require> | |
| <my-comp></my-comp> | |
| </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
| <template> | |
| <template if.bind="editMode"> | |
| <input value.bind="editValue"> | |
| <button click.delegate="save()">save</button> | |
| <button click.delegate="editMode = false">cancel</button> | |
| </template> | |
| <template else> | |
| <h1>${message} <button click.delegate="enterEditMode()">edit</button></h1> | |
| </template> | |
| </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
| <template> | |
| <require from="./dyn-field"></require> | |
| <form> | |
| <dyn-field | |
| repeat.for="prop of properties" | |
| label.bind="prop.label" | |
| value.bind="model | get:model:prop.expression" | |
| errors.bind="errors | get:errors:prop.expression"></dyn-field> | |
| </form> |
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> | |
| <p>select with repeat.for options. foo = ${foo}</p> | |
| <select value.bind="foo"> | |
| <option repeat.for="opt of ['one', 'two']" model.bind="opt">${opt}</option> | |
| </select> | |
| <p>select with one option + repeat.for options. foo2 = ${foo2}</p> | |
| <select value.bind="foo2"> | |
| <option value="one">one</option> | |
| <option repeat.for="opt of ['two']" model.bind="opt">${opt}</option> |