Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working if the property name has camel casing in it. #18

Closed
Debananda opened this issue Sep 6, 2016 · 4 comments
Closed

Not working if the property name has camel casing in it. #18

Debananda opened this issue Sep 6, 2016 · 4 comments

Comments

@Debananda
Copy link

The directive is not working for polymer property name with came casing. probably need to rewrite the regex again var match = $attr[prop].match(/{{\s([.\w]+)\s_}}/);

@eee-c
Copy link
Owner

eee-c commented Sep 6, 2016

This should work. The \w in the regex matches any non-whitespace character -- lower and uppercase. In fact, I'm actively using this for camel case Polymer properties so I'm surprised this is causing trouble.

I'm not saying that there isn't a problem. There likely is and, even more likely, I'm misunderstanding your description :)

But... I'll need a test case that demonstrates the problem. Would it be possible to modify the Karma tests in this repos to demonstrate the bug and submit a pull request? The PR doesn't have to include a fix, but a failing test would be fantastic.

@Debananda
Copy link
Author

I have updated the paramter out to outValue... I have attached the codes below have a look

x-double.html

`

<script> Polymer({ is: "x-double", properties: { in: { type: Number, value: 0, observer: 'inChanged' }, outValue: { type: Number, reflectToAttribute: true } }, ready: function(){ this.inChanged(); }, inChanged: function(){ this.outValue = parseInt(this.in) * 2; } }); </script>

`

index.html

<p> in:<br> <input type=text value="6" ng-model="in"> <pre ng-bind="in"></pre> </p> <p> out: <pre ng-bind="doubled"></pre> </p> <x-double bind-polymer in="{{in}}" out-value="{{doubled}}" disabled test="test"></x-double> </div>

check this.. this is failing. here doubled is not getting updated

@Debananda
Copy link
Author

@eee-c : did you get a chance to look into the snippet i have provided.

@eee-c
Copy link
Owner

eee-c commented Sep 10, 2016

Much thanks for the snippet. I'm crazy swamped these days (who isn't
though?), but I want to get to this today or tomorrow.

I really appreciate the snippet -- it's a huge help! I think I see the
problem and am reasonably sure I can fix it. I'll let you know shortly...

On Sat, Sep 10, 2016 at 1:15 AM, Debananda Mohanty <notifications@github.com

wrote:

@eee-c https://github.com/eee-c : did you get a chance to look into the
snippet i have provided.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#18 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABnoPBBzMnFX84Vt02xGbJR8sMpmJGmks5qoj0CgaJpZM4J2B0W
.

@eee-c eee-c closed this as completed in b1feec3 Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants