It seems like this issue is related to
https://github.com/PolymerElements/iron-list/issues/36 as well.

~ Emmanuel


On Fri, Jul 24, 2015 at 11:23 AM, Kujako <[email protected]> wrote:

> That looks right, and when I copy in my code it works OK. The error seems
> to only happen when I have my-list defined in an external file....
>
> So if I copy the code into a file named "my-list.html" and import it
> with...
> <link rel="import" href="/elements/my-list.html"/>
>
> and then reference it with...
> <my-list></my-list>
>
>
> I see the error...
>
> On Friday, July 24, 2015 at 11:01:29 AM UTC-7, Emmanuel Garcia wrote:
>>
>> Is there something different in this example
>> http://jsbin.com/facani/edit?html,output (apart from the css)?
>>
>> On Friday, July 24, 2015 at 10:47:11 AM UTC-7, Kujako wrote:
>>>
>>> Yes, bower.json shows version 1.0.1
>>>
>>> On Friday, July 24, 2015 at 10:37:29 AM UTC-7, Emmanuel Garcia wrote:
>>>>
>>>> Are you using the last version of iron-list (v1.0.1)?  Here's your code
>>>> using the last version: http://jsbin.com/facani/edit?html,output
>>>>
>>>> bower update or
>>>> https://github.com/PolymerElements/iron-list/releases/tag/v1.0.1
>>>>
>>>>
>>>> On Friday, July 24, 2015 at 9:16:32 AM UTC-7, Kujako wrote:
>>>>>
>>>>> I'm trying to setup an iron-list using a local array for its data
>>>>> source.
>>>>>
>>>>> <dom-module id=“my-list">
>>>>>   <template>
>>>>>     <iron-list items="{{myItems}}" as="item" indexAs="myIndex">
>>>>>       <template>
>>>>>         <div class="item">{{item.name}}</div>
>>>>>       </template>
>>>>>     </iron-list>
>>>>>   </template>
>>>>>   <script>
>>>>>     Polymer({
>>>>>       is:’my-list',
>>>>>       properties: {
>>>>>         myItems: {
>>>>>         type: Array,
>>>>>         notify: true
>>>>>         }
>>>>>       },
>>>>>       addItem: function(item) {
>>>>>         this.push("myItems", JSON.parse('{"name":"'+item+'"}'));
>>>>>       },
>>>>>       ready: function() {
>>>>>         this.myItems=[
>>>>>         {'name':'Taco'},
>>>>>         {'name':'Burger'},
>>>>>         {'name':'Fries'},
>>>>>         {'name':'Chips'}
>>>>>         ];
>>>>>       }
>>>>>     });
>>>>>   </script>
>>>>> </dom-module>
>>>>>
>>>>>
>>>>> Everything works, but from the ready() method I get "Uncaught
>>>>> RangeError: Invalid array length". This seems to happen whenever the array
>>>>> is set for the first time. While this does not impact operations from a
>>>>> browser, Cordova stops on this error.
>>>>>
>>>>>
>>>>> Any ideas as to how to suppress or prevent this error? Kind of running
>>>>> blind as I can't find any example code to work off of.
>>>>>
>>>>>
>>>>>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CAMFWwnSaXHiUw_f%3DEqQv%3DhfEX%3Dv3xS1E074CiZnkv98M%3Dw%3DrMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to