Hi,
im making an app based on the webix jet demo app.
Im using the global event bus to communicate between views.
But now i noticed that my events are called multiple times. For example if i visit the view url 3 times, then at the last visit the events will be triggered 3 times.
Here are some parts of the code in this subview.
Basically i have a richselect that should trigger the event defined in $oninit. Like sad the problem is that it triggers it multiple times.
Any idea why this could happen?
var controls = [
{view:"richselect", id:"order_filter", value: "all", maxWidth: 400, minWidth: 250, vertical: true, labelWidth: 100, options:[
{id:"7", value:"7 days back"},
], label:"Change time", on:{
onChange:function(){
app.trigger("onChangeDaysBack");
}
}
}
];
.
.
.
return {
$ui: layout,
$oninit: function(view, $scope){
app.attachEvent("onChangeDaysBack" ,function(){
debugger;
}
}
}