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

ans-five 点评 #3

Closed
jwu opened this issue Mar 25, 2015 · 1 comment
Closed

ans-five 点评 #3

jwu opened this issue Mar 25, 2015 · 1 comment

Comments

@jwu
Copy link

jwu commented Mar 25, 2015

答案:

Polymer({
  foo: 'foo',
  bar: 'bar',

  created: function () {  
    this.foobar = [];
    this.settings = {
      text: 'hello foobar'
    };
  },

  ready: function () {
    console.log('foobar ready!');
  },
});

请告诉我为什么是这样的设计?

@LKeL
Copy link
Owner

LKeL commented Mar 25, 2015

不在created里面创建,会导致多个相同element的实例共享

@LKeL LKeL closed this as completed Jul 23, 2017
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