README
The ref middleware
The ref
middleware is responsible for handling internal references.
- name: ref
- middleware dependencies: attributes
- all middleware dependencies: observe, attributes
- type: component or content middleware
- ignores: text nodes
- docs
Installation
npm install @nx-js/ref-middleware
Usage
const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const ref = require('@nx-js/ref-middleware')
component()
.useOnContent(observe)
.useOnContent(attributes)
.useOnContent(ref)
.register('nav-comp')
<nav-comp>
<a iref="profile">Profile</a>
<a iref="settings">Settings</a>
</nav-comp>