In Aurelia, the requirement is for the textchanged event Consumer to pass the event and not be in control. The Consumer will execute their code on the textchange event, while the Component simply exposes that event. How can this be created in Aurelia?
Component
textbox.html
<input type="text" class="form-control change.delegate="inputValueChange()">
textbox.ts
constructor() {
}
attached() {
this.controller.validateTrigger = validateTrigger.changeOrBlur;
this.controller.addRenderer(new BootstrapFormRenderer());
this.controller.validate();
}
public inputValueChange(newValue, oldValue){
console.log(newValue)
}
}
app.html
<template>
<textbox maxlength="10" autocomplete="on"></textbox>
<template>