-
-
Save CuddleBunny/4e78f4b92109035f346caf2ca6153408 to your computer and use it in GitHub Desktop.
$parent & behavior parser error
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> | |
<!-- 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> |
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
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; | |
} | |
} |
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
<!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