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
<template> | |
<h1>${message}</h1> | |
<compose view="./comp.html"></compose> | |
</template> |
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
<template> | |
<router-view></router-view> | |
<button click.delegate="click()">Replace</button> | |
</template> |
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
<template> | |
<require from="./svg-rect"></require> | |
<svg width="100" height="200" style="background-color:lightblue"> | |
<svg-rect | |
repeat.for="i of 5" | |
rect.bind="{x: 5, y: 5 + (i * 25), width: 30, height: 20}"></svg-rect> | |
</svg> | |
</template> |
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
<template> | |
<p><strong>OPEN Console window first, to see values when clicking the buttons</strong></p> | |
<p>What I would like (in some cases, I populate the values myself - generated by ASP.NET Razor HTML helper):</p> | |
<select value.bind="pageTypeId"> | |
<option value="0bedc229-2280-46fa-b157-bce4f1cddeaa">Standard Page</option> | |
</select> | |
<button click.delegate="showValue()">Show Value</button> | |
<p>This way forces user to select an option:</p> |
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
<template> | |
<require from="demo-container"></require> | |
<h2>Current behaviour</h2> | |
<h4>Sometimes when swapping elements the template used is not the right one for the repeat</h4> | |
<button click.delegate="swapElements(bogusAppItems, bogusOtherAppItems)">Swap elements</button> | |
<demo-container container-items.bind="bogusAppItems"> | |
<template replace-part="item-replaceable"> | |
<span>${containerItem.description}</span> | |
</template> |
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
<template> | |
<require from="./lookup"></require> | |
<h1>${message}</h1> | |
<button click.delegate="addItem()">Add item ${items.length}</button> | |
<button click.delegate="removeRandomItem()">Remove random</button> | |
<div repeat.for="item of items"> | |
Index: ${$index} | Id: ${item.id} >>> ${item.value & lookup:item:'type'} | |
</div> | |
</template> |
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
import {inlineView} from 'aurelia-templating'; | |
@inlineView('<template>I\'m a 3D viewer</template>') | |
export class ViewerViewModel { } |
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
<template> | |
<input type='file' multiple change.trigger='onSelectFiles($event.target.files)' /> | |
<ul> | |
<li repeat.for='upload of uploads'> | |
# ${$index} Time - ${upload.estimateUploadTime} <-> ${(upload.progress / upload.size * 100).toFixed(2)}% | |
<br/> | |
<img width=100 height=100 src.bind=upload.url /> | |
<progress min=0 max.bind=upload.size value.bind='upload.progress' ></progress> | |
</li> |
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
<template> | |
<require from="./my-attribute"></require> | |
<require from="./my-element"></require> | |
<my-element val="el1"></my-element><br/> | |
<!-- i would like to see Value: el2 in the output --> | |
<my-element my-attribute="el2"></my-element> | |
</template> |
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
<template> | |
<input type="number" value.bind="value" /> | |
<pre>${log}</pre> | |
</template> |