Skip to content

Instantly share code, notes, and snippets.

@jdanyow
Created August 25, 2016 23:43
Show Gist options
  • Save jdanyow/065b5e45ea473fac03d98c85945739cf to your computer and use it in GitHub Desktop.
Save jdanyow/065b5e45ea473fac03d98c85945739cf to your computer and use it in GitHub Desktop.
<template>
<div>Model.nr is ${model.nr}, div below is visible, when model.nr > 0</div>
<div if.bind="model.nr > 0 & debounce:2000">${model.nr} ${model.nr < 0 ? 'ERROR: Should not stay visible' : ''}</div>
<button click.delegate="model.nr = model.nr * -1">${model.nr}</button>
<div>double click the button when the value is '-10' to produce this issue</div>
</template>
export class App {
model = { nr: -10 }
}
<!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