Closed Alxandr closed 8 years ago
:+1:
Would be nice if attribute maps could be scoped to a particular node type as well.
https://github.com/aurelia/binding/issues/80#issuecomment-102217602
@jdanyow Any thoughts on this? Should we make some improvements for this?
I think we need to implement this as well as support for mapping specific node-name/attr-name combinations. Will put this in my queue.
@jdanyow I suggest just extending the api to
attributeMap.get(node.tagName, 'attribute-name');
Would allow it to choose to ignore or care about the tag name on it's own.
Currently, if you encounter an attribute - property pair with different names (like
colspan
!=colSpan
) it has to be added to aurelia, and you have to wait for a new release.Or, you could inject the binding-language, hoping that it's the default one, and use a private API to extend it yourself.
I'm suggesting it should exist as a simple public API used by the binding language instead, so I can do stuff like this in my
main
:Note, it doesn't have to be exactly like that, it's only a suggestion to the API. The point is to have something simple and extendible, with a public API surface.