Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 656 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 656 Bytes

The events middleware

The events middleware allows you to use inline event handler attributes in the HTML view.

  • name: events
  • middleware dependencies: none
  • all middleware dependencies: none
  • type: component or content middleware
  • ignores: text nodes
  • docs

Installation

npm install @nx-js/events-middleware

Usage

const component = require('@nx-js/core')
const events = require('@nx-js/events-middleware')

component()
  .useOnContent(events)
  .register('events-comp')
<events-comp>
  <button #click="alert('Hello World!')">Click me</button>
</events-comp>