-
-
Save AshleyGrant/f83665056ab59a396439070cc4a8c899 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
<template> | |
<input type="text" value.bind="foo.bar" /> | |
<button click.delegate="fireSignal()">Fire signal</button> | |
<div> | |
Without Signal: | |
<div><pre>${foo | toJson}</pre></div> | |
</div> | |
<div> | |
With Signal: | |
<div><pre>${foo | toJson & signal:'my-signal'}</pre></div> | |
</div> | |
</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
import {BindingSignaler} from 'aurelia-templating-resources'; | |
import {inject} from 'aurelia-framework'; | |
@inject(BindingSignaler) | |
export class App { | |
constructor(signaler) { | |
this.signaler = signaler; | |
} | |
fireSignal() { | |
this.signaler.signal('my-signal') | |
} | |
foo = { | |
bar: 'Ashley' | |
} | |
} | |
export class ToJsonValueConverter { | |
toView(value) { | |
return JSON.stringify(value); | |
} | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body aurelia-app> | |
<h1>Loading...</h1> | |
<script src="https://jdanyow.github.io/rjs-bundle/node_modules/requirejs/require.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/config.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js"></script> | |
<script src="https://jdanyow.github.io/rjs-bundle/bundles/babel.js"></script> | |
<script> | |
require(['aurelia-bootstrapper']); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment