nanof

1.1.0 • Public • Published

ultra minimalist framework

Build Status

usage

import $k from 'nanof'

activate

Activate is a function to bind a js module to a DOM element.

The function takes as a parameter the module / controller name and a js module ( a function ).

The frameworks expects that there is at least an HTML element with the controller attribute set.

The function will receive as parameters a $ function bound to the root element and the root element. If there are multiple elements referring the same controller, the module will be activated once for element.

<div controller="my-cool-app">
  ...
</div>
$k.activate("my-cool-app", function($, element) {
  // ...
});

Readme

Keywords

none

Package Sidebar

Install

npm i nanof

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

16.5 kB

Total Files

12

Last publish

Collaborators

  • kajyr