Skip to content

Support for custom elements #21

@johndelrosario

Description

@johndelrosario

Hi ryan, I absolutely love this plugin and currently using it in developing a library for components.
However, I had to override to component binding handler in order to register the bindings i provide for the params attribute.

This is on the last part of init of the component handler

if (ko.bindingProvider.instance['registerBindings']) {
    ko.bindingProvider.instance.registerBindings(currentViewModel);
} else {
    throw new Error('Class binding provider must first be loaded to use custom component handler.');
}

ko.applyBindingsToDescendants(childBindingContext, element);

The way i declare the params for the binding class is like this

component: {
    params: {
        ///any
    }
}

I think it's kind of a bloat to overwrite the binding handler just to register the binding. Is there another way to extend the bindings without having to override? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions