Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Data binding in css class generate: [polymer-expression-parse-error] - Unexpected token, expected "," #2599

Open yairopro opened 6 years ago

yairopro commented 6 years ago

Description

The following problem occurs only in version 1.7.0, no in 1.6.0. My component has a method : * exp(String expression, *[] ...params). The method takes as first parameter a string expression, and datas for the followings. Exemple : [[exp("$0 ? $1 : $2", condition, value1, value2)]] will be executed like this.condition ? this.value1 : this.value2. I use this method decide which css class to apply to my elements in the shadow DOM, like: <my-button class$="[[exp('$0 ? \'error\' : \'default\'', invalid)]]">Click</my-button>. But since polymer-cli 1.7.0, this throw an error [polymer-expression-parse-error] - Unexpected token, expected ",".

Versions & Environment

Steps to Reproduce

Try to data bind a function with multiple parameters in a css class.

Expected Results

No error is throw

Actual Results

Throw an error [polymer-expression-parse-error] - Unexpected token, expected ","

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.