Skip to content

Instantly share code, notes, and snippets.

@CuddleBunny
Forked from jdanyow/app.html
Last active July 18, 2017 17:00
Show Gist options
  • Save CuddleBunny/4e78f4b92109035f346caf2ca6153408 to your computer and use it in GitHub Desktop.
Save CuddleBunny/4e78f4b92109035f346caf2ca6153408 to your computer and use it in GitHub Desktop.
$parent & behavior parser error
<template>
<!-- This works: -->
<div repeat.for="item of things">
${item | test:message2:{ vm: $parent } & signal:'some-signal'}
</div>
<!-- This offends the parser. Uncomment to see error. -->
<!-- <div repeat.for="item of things">
${item | test:message:$parent & signal:'some-signal'}
</div> -->
</template>
export class TestValueConverter {
toView(source, test, vm) {
return test(source, vm);
}
}
export class App {
things = [
'this ',
'another '
];
thing = 'message';
message(source, vm) {
return source + vm.thing;
}
message2(source, vm) {
return source + vm.vm.thing;
}
}
<!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