Skip to content

Instantly share code, notes, and snippets.

@futpib
Created April 24, 2017 10:22
Show Gist options
  • Save futpib/50f347778f668203430b158f2b11e431 to your computer and use it in GitHub Desktop.
Save futpib/50f347778f668203430b158f2b11e431 to your computer and use it in GitHub Desktop.
ko feature request: Components and bindings as values (instead of or with registration)

I often find myself in a need of a local, private or "anonymous" binding as well as component (much like in #1444).

Registration via ko.component.register(name, ...) and ko.bindingHandlers[name] = ... for such cases is cumbersome and requires careful naming (namespacing, name mangling) or symbols (#2172) to make sure the thing you register is private-enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment