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

Publish a property by listing it in the attributes fails #482

Closed
juanmac opened this issue Apr 26, 2014 · 7 comments
Closed

Publish a property by listing it in the attributes fails #482

juanmac opened this issue Apr 26, 2014 · 7 comments

Comments

@juanmac
Copy link

juanmac commented Apr 26, 2014

Publish a property by listing it in the attributes fails

Publish properties by listing it in the attributes in a <polymer-element> currently throws TypeError: undefined is not a function. I'm using polymer 0.2.3 in chrome 34 under Ubuntu 13. Also fails in firefox 28. The following example taken from official documentation fails:

<!DOCTYPE html>
<html>
  <head>
    <script src="platform.js"></script>
    <link rel="import" href="/components/polymer/polymer.html">
  </head>
  <body>

    <polymer-element name="color-picker" attributes="owner color">
      <template>
        This is a <strong>{{owner}}</strong>'s color-picker. 
        He likes the color <b style="color: {{color}}">{{color}}</b>.
      </template>
      <script>
        Polymer('color-picker', {
          // These default values are overridden
          // by the user's attribute values.
          color: "red",
          owner: "Daniel"
        });
      </script>
    </polymer-element>

    <color-picker owner="Scott" color="blue"></color-picker>

  </body>
</html>
@juanmac
Copy link
Author

juanmac commented Apr 26, 2014

I just test the same example with polymer 0.2.2 and work as expected, but fails with 0.2.3. Maybe it is a breaking change that I'm missing?

@robdodson
Copy link
Contributor

Can you look at the bower.json file for platform.js and let us know the version number?

@juanmac
Copy link
Author

juanmac commented Apr 26, 2014

ok, installing with bower install polymer --save, the installed version of platform,js is 0.2.2

@juanmac
Copy link
Author

juanmac commented Apr 26, 2014

if I manually install platform.js 0.2.3 it solve the problem. However this is the bower.json for polymer when i install it with bower:

{
  "name": "polymer",
  "description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
  "homepage": "http://www.polymer-project.org/",
  "keywords": [
    "util",
    "client",
    "browser",
    "web components",
    "web-components"
  ],
  "author": "Polymer Authors <[email protected]>",
  "version": "0.2.3",
  "main": [
    "polymer.js"
  ],
  "dependencies": {
    "platform": "Polymer/platform#0.2.2"
  }
}

@robdodson
Copy link
Contributor

cc @azakus

It looks like the old version made it into the bower.json. We'll fix that.

In the short term I would recommend installing Polymer this way:

bower install --save Polymer/polymer

@ragingwind
Copy link
Contributor

bower cache clean polymer; bower update

#481 (comment)

@robdodson
Copy link
Contributor

Closing. Looks like the tag was updated.

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

3 participants