The attributes
middleware extends native attributes with dynamic behavior and provides a way to add custom attributes.
- name: attributes
- direct middleware dependencies: observe
- all middleware dependencies: observe
- type: component or content middleware
- ignores: text nodes
- docs
npm install @nx-js/attributes-middleware
const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
component()
.useOnContent(observe)
.useOnContent(attributes)
.register('attributes-comp')
<attributes-comp>
<span @hidden="!show">Hello World!</span>
</animated-comp>