Closed nenadvicentic closed 6 years ago
What version of aurelia-templating
? I think the fix for this is out in aurelia-templating@1.7.0
.
I just checked. I am using aurelia-templating@1.7.0
.
Bellow are versions of related packages:
"aurelia-templating": "1.7.0", "aurelia-templating-binding": "1.4.0", "aurelia-templating-resources": "1.5.4", "aurelia-templating-router": "1.3.1"
Just checked and it works as expected with aurelia-templating@1.7.0
. Things you can check:
aurelia-templating@1.7.0
is actually installed - not just in the package.json
I just double checked and managed to reproduce the bug again.
Code that was fixed in aurelia-templating@1.7.0
is here:
https://github.com/aurelia/templating/commit/5a2276c
I debugged those lines (screenshot), so I am definitely running version 1.7.0. Parsing of my custom-attribute property-names does not go through this lines of code at all. Here is example where it parses if
binding.
Is it possible that the problem are lines code bellow? You can see that both name
and attrName
have same, camel case value, in my case eventName
:
Those lines of code are part of [SyntaxInterpreter](https://github.com/aurelia/templating-binding/blob/master/src/syntax-interpreter.js)
class in master
.
Not sure, haven't looked at those lines. Can do later tonight. If you can setup a simple repro I'll debug it - as a github repo will be easiest.
Here is the repo: https://github.com/nenadvicentic/aurelia-template-binding-primary-property-not-working
Default aurelia-cli
project, just two buttons added on the page. First button using shorthand syntax and having an error. Second one using longer syntax, binding correctly.
Will check it after work, but the first difference I see with what I tried is I did .bind
- track-click.bind="'Hello from Button 1'"
I didn't notice how you used it in the first example.
@nenadvicentic you can test #123 if you want.
@StrahilKazlachev, I tried your fix in my repro. It works fine now. Thx
I'm submitting a bug report
Please tell us about your environment:
Operating System: Windows 10
Node Version: 8.9.4
NPM Version: 5.5.1
Browser: all
Language: all
Current behavior: Primary property binding does not work for camel-cased property names.
Shorthand binding expression does not work:
<a track-link="download" href=... >
Longer binding syntax works as expected:
<a track-link="link-type: download" href=... >
Once property is renamed into lowercase, shorthand binding syntax start to work too.
Expected/desired behavior:
primaryProperty
should work for both lower-case and camel-case property names.