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] Attribute deserialization possibly busted? #1208

Closed
robdodson opened this issue Feb 20, 2015 · 3 comments
Closed

[0.8] Attribute deserialization possibly busted? #1208

robdodson opened this issue Feb 20, 2015 · 3 comments
Assignees
Labels

Comments

@robdodson
Copy link
Contributor

I feel like this has to be user error, but thought I'd file it anyway...

Given this element:

Polymer({

  is: 'x-custom',

  published: {
    user: String,
    manager: {
      type: Boolean,
      notify: true
    }
  },

  created: function() {
    this.textContent = 'Hi I am ' + (this.user || 'nobody');
  }

});

Used as:

<x-custom user="Rob"></x-custom>

What render is Hi I am nobody. I was expecting Hi I am Rob.

@dhubler
Copy link

dhubler commented Feb 20, 2015

"created" is before attributes, "attached" is after and should work in this
case.

On Thu Feb 19 2015 at 10:38:47 PM Rob Dodson notifications@github.com
wrote:

I feel like this has to be user error, but thought I'd file it anyway...

Given this element:

Polymer({

is: 'x-custom',

published: {
user: String,
manager: {
type: Boolean,
notify: true
}
},

created: function() {
this.textContent = 'Hi I am ' + (this.user || 'nobody');
}

});

Used as:

What render is Hi I am nobody. I was expecting Hi I am Rob.


Reply to this email directly or view it on GitHub
#1208.

@robdodson
Copy link
Contributor Author

If that's the case we should update the PRIMER.md https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#attribute-deserialization

@sorvell
Copy link
Contributor

sorvell commented Mar 5, 2015

Fixed via 0270e49

@sorvell sorvell closed this as completed Mar 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants