Optional
listeners?: ObservableListener<EventMap>Add listeners
You can pass them in two ways:
comp({
listeners: {
//simple syntax add the listener directly
additem:(container, item, index) => {
//do something when an item was added
},
// extended syntax to pass extra listener options
beforeadditem: {
//with this syntax you can pass extra options
fn:(container, item, index) => {
//do something before an item will be added but only once
},
once: true
}
}
})
```
Observable.on()
Generated using TypeDoc
Generic Config option that allows all public properties as options. It excludes all function types. If you need to pass functions as config options you will need to add them like this: