Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Indexer expressions like {{ myproperty[2] }} should work. #112

Closed
krisnye opened this issue Jun 25, 2013 · 4 comments
Closed

Indexer expressions like {{ myproperty[2] }} should work. #112

krisnye opened this issue Jun 25, 2013 · 4 comments
Labels

Comments

@krisnye
Copy link

krisnye commented Jun 25, 2013

Of course you should also be able to nest an expression inside it like this {{ myproperty[ myotherproperty * 5 ] }}

@arv
Copy link
Contributor

arv commented Jun 26, 2013

Here is a test

arv@7b4b2be

@rafaelw
Copy link
Contributor

rafaelw commented Sep 9, 2013

I believe this is now fixed

@rafaelw rafaelw closed this as completed Sep 9, 2013
@kaosat-dev
Copy link

I might be missing something, but it seems like this does not work in all cases :
If you have an attribute like this one:
objArray:[{name:"foo"},{name:"bar"}]

In a template , this works
{{objArray.0.name}}

but this does not
{{objArray[0].name}}
(throws error : Invalid expression syntax: objArray[0].name)

I also whipped up a jsbin for clarity:
http://jsbin.com/iFUlEBAp/2/edit?html,output

@rafaelw
Copy link
Contributor

rafaelw commented Nov 27, 2013

Good catch, @kaosat-dev Fixed here: googlearchive/polymer-expressions@fd80253

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants