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

Binding with custom names #163

Open
oesleik opened this issue Dec 13, 2016 · 2 comments
Open

Binding with custom names #163

oesleik opened this issue Dec 13, 2016 · 2 comments

Comments

@oesleik
Copy link

oesleik commented Dec 13, 2016

I'm not able to reproduce properly the binding example. When I try to use some custom name other than id, it doesn't set the attributes.

<app-router mode="hash">
    <app-route path="/binding/:id" element="page-test"></app-route>
    <app-route path="/notbinding/:orderId" element="page-test"></app-route>
</app-router>
window.onload = function() {
    document.registerElement('page-test', {
        prototype: Object.create(HTMLElement.prototype, {
            createdCallback: {
                value: function() {
                    console.log(this, this.attributes);
                }
            }
        })
    });

    document.querySelector("app-router").init();
};

When I open #/binding/25 it set the id attribute, but when I open #/notworking/25, it doesn't set the orderId attribute.

oesleik added a commit to oesleik/app-router that referenced this issue Dec 14, 2016
@web-padawan
Copy link

Why using notbinding in markup and notworking url?

@oesleik
Copy link
Author

oesleik commented Dec 14, 2016

A typo

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