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

Error in 0.8 RC6 - not present in RC4 #1428

Closed
mdwragg opened this issue Apr 21, 2015 · 7 comments
Closed

Error in 0.8 RC6 - not present in RC4 #1428

mdwragg opened this issue Apr 21, 2015 · 7 comments
Assignees

Comments

@mdwragg
Copy link

mdwragg commented Apr 21, 2015

Hi,

@tjsavage asked me to raise a bug here - I was on polymer.slack.com highlighting a bug between 0.8RC4 and RC6.

We get the error below (in Chrome):

image

Our template looks a little like this:

        <template is="x-repeat" items="{{navItems}}">
          <li>
            <a class$="{{item.class}}" href$="{{item.href}}" on-click="navClickHandler"><i class$="{{item.icon}}"></i><span data-l10n-id$="{{item.l10nId}}">{{item.label}}</span></a>
            <ul class="list-bare visuallyhidden">
              <template is="x-repeat" items="{{item.subitems}}">
                <li>
                  <a href$="{{item.href}}" on-click="subnavClickHandler"><span class="visuallyhidden" data-l10n-id$="{{item.l10nId}}">{{item.label}}</span></a>
                </li>
              </template>
            </ul>

          </li>
        </template>

Again, this is fine in RC4 and errors in RC6.

Thanks!

@sorvell
Copy link
Contributor

sorvell commented Apr 21, 2015

Thanks for reporting this problem. I can confirm the issue. It'll be fixed in the next rc.

@Diwatt
Copy link

Diwatt commented Apr 21, 2015

Hi,
An other issue if i use the "observers" property.

screenshot from 2015-04-21 11 15 16

<dom-module id="ugo-test">
    <template>
        <content></content>
    </template>
</dom-module>
<script>
    Polymer({
        is: 'ugo-test',
        properties: {
            attr1: String,
            attr2: String
        },

        observers: {
            'attr1 attr2': 'onPropChange'
        },
        onPropChange: function () {}
    });
</script>

It works well in RC4.

Bye

@IntranetFactory
Copy link

There was a breaking change in the observers syntax. See https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#multipe-property-observation for current syntax. So in your sample it should now be

        observers: [
            'onPropChange(attr1, attr2)'
       ],

@Diwatt
Copy link

Diwatt commented Apr 21, 2015

Thanks !

@mdwragg
Copy link
Author

mdwragg commented Apr 21, 2015

Excellent - thanks @sorvell

@sorvell sorvell self-assigned this Apr 21, 2015
@sorvell
Copy link
Contributor

sorvell commented Apr 22, 2015

Fixed via 4a5ad41

@sorvell sorvell closed this as completed Apr 22, 2015
@mdwragg
Copy link
Author

mdwragg commented Apr 24, 2015

Thanks for fixing so quickly @sorvell 👍

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

4 participants