JQuery Module
Install
npm install --save @ribajs/jquery
Regist
To regist the module include import jqueryModule from '@ribajs/jquery';
in your main.ts
file and regist the module with riba.module.regist(jqueryModule);
:
import { Riba, coreModule } from '@ribajs/core';
import { JQuery, jqueryModule } from '@ribajs/jquery';
const riba = new Riba();
const model = {};
riba.module.regist(coreModule);
riba.module.regist(jqueryModule);
JQuery(() => {
riba.bind(document.body, model);
});
Binders
on-[event]
Binds an event listener on the element using the event specified in [event]
and the bound object (should return a function) as the callback.
This binder has the same functionality as the binder with the same name from the coreModule, but internally uses the jquery .on()
and .off()
event methods
<button rv-on-click="destroy | args item">Remove</button>