On 6 July 2017 at 01:08, Daniel Llewellyn <[email protected]> wrote:
>
> <dom-bind id="app">
> <my-app name="[[temp]]"></my-app>
> </dom-bind>
>
> <script>
> var app = document.getElementById("app");
> app.temp = localStorage.getItem("saved");
> </script>
>
Oops, I also bound the array directly to the string-requiring field in
this first example. You probably want to use something like the _getAnItem
function from the second example in the example above. (the function is
below)
> // add _getAnItem() function to return something meaningful - you need a
> string, but the example you provided in temp holds an array.
> app._getAnItem = function(arr) {
> return arr[0].name;
> }
>
--
Daniel Llewellyn
Bowl Hat
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/CABtuYwdM%2Bstx%2BxDopuFbXYauFYmGk0P_LSHDCNOJRo4M32zr0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.