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

[0.8] Unexpected token ] #1298

Closed
robdodson opened this issue Mar 15, 2015 · 2 comments
Closed

[0.8] Unexpected token ] #1298

robdodson opened this issue Mar 15, 2015 · 2 comments

Comments

@robdodson
Copy link
Contributor

Not sure why I'm getting this error, maybe it's PEBCAK, but nothing is jumping out at me as wrong in my element definition.

Element definition:

<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="dnews-story-comments">
  <style>
    :host {
      display: inline-block;
    }
  </style>
  <template>
    <span>[[votes]] points and</span>
  </template>
</dom-module>

<script>

  Polymer({

    is: 'dnews-story-comments',

    properties: {
      votes: Number
    }

  });

</script>

Usage:

<dnews-story-comments votes="2"></dnews-story-comments>

Error:

(function(old
/**/) {
    this._nodes[0].textContent = this._data.points]] points a;
})
@IntranetFactory
Copy link

Afaik the binding annotation must currently span the entire content of the tag (https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#basic-property-binding)

So <span>[[votes]]</span> points and might work

@robdodson
Copy link
Contributor Author

@IntranetFactory ah thanks! I totally overlooked that. Well hopefully this ticket can serve as a signpost for anyone else who makes the same mistake :)

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