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> | |
| <compose view-model="header" view.bind="header.html"></compose> | |
| <h1>${message}</h1> | |
| Links: | |
| <ul> | |
| <li><a href='#/'>root</a></li> | |
| <li><a href='#connect'>connect</a></li> | |
| <li><a href='#connect/testapp'>connect/testapp</a></li> |
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
| import {sourceContext} from 'aurelia-binding'; | |
| export class DirtyBindingBehavior { | |
| bind(binding, source, event, period=140) { | |
| if (!binding.updateTarget) { | |
| throw new Error('Only property bindings and string interpolation bindings can be dirty checked. Trigger, delegate and call bindings cannot be dirty checked.'); | |
| } | |
| binding.interceptedupdateTarget = binding.updateTarget; | |
| binding.updateTarget = (a) => { |
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
| import {sourceContext} from 'aurelia-binding'; | |
| export class ValidationBindingBehavior { | |
| handleChanges = (bindingTarget) =>{ | |
| bindingTarget.__validationGroupElement.__valGrp.validateProperty(bindingTarget.__propName); | |
| } | |
| bind(binding, source, on='input') { |
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> | |
| <h1>${message}</h1> | |
| 'mynumber' is used as a trigger to cause Aurelia to recalculate the repeat loop. | |
| <ul> | |
| <li repeat.for="id of getMyKeys(mynumber)">${id}</li> | |
| </ul> | |
| <button click.delegate='change()'>Change</button> |
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> | |
| <h1>${message}</h1> | |
| Links: | |
| <ul> | |
| <li><a href='#/'>root</a></li> | |
| <li><a href='#connect'>connect</a></li> | |
| <li><a href='#connect/testapp'>connect/testapp</a></li> | |
| </ul> | |
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> | |
| <h1>${message}</h1> | |
| Links: | |
| <ul> | |
| <li><a href='#/'>root</a></li> | |
| <li><a href='#connect'>connect</a></li> | |
| <li><a href='#connect/testapp'>connect/testapp</a></li> | |
| </ul> | |
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="./component"></require> | |
| <button click.delegate="swapArrays()">Swap arrays</button> | |
| <br> | |
| <component | |
| repeat.for="id of componentsProxy" | |
| id.bind="id" | |
| ></component> |
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='scriptinjector'></require> | |
| <h1>${message}</h1> | |
| <scriptinjector url="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" is-async.bind='true'></scriptinjector> | |
| <scriptinjector url="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" is-async.bind='true'></scriptinjector> | |
| </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> | |
| <ul> | |
| <li repeat.for='r of router.navigation'><a href='${r.href}'>Go to ${r.title}</a></li> | |
| </ul> | |
| <h1>${message}</h1> | |
| <router-view></router-view> | |
| </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> This is in test1 for an ADMINISTRATOR!</template> |