Quantcast
Viewing all articles
Browse latest Browse all 3491

Re : Idea for more reusability

If you need "mixin" functionality, this can be accomplished in a number of ways:
      1) can.view.attr + can.Control/direct bindings
      2) can.Component + no template, or template with <content/> and nesting
      3) helpers

As it stands right now, CanJS is VERY reusable, especially if you're making novel components and nesting as appropriate. How would what you're envisioning differ from any of these approaches?

Just throwing this out there, but I think doing can.view.attr('foo', Bar) would work, where Bar is a controller constructor. Worst case you could make a setup override to mutate attrData or otherwise use a wrapper.

Viewing all articles
Browse latest Browse all 3491

Trending Articles