Hi all,
I'm trying to access the instance of a kendo ui widget from within an angular directive.
To do so, I'm using kendo's widgetInstance function.
However, in angular's link function, the widget is not yet created (line 3).
I've read about the kendoWidgetCreated event; when using this, there are 2 issues (line 7):
Thanks for your time,
Koen
I'm trying to access the instance of a kendo ui widget from within an angular directive.
To do so, I'm using kendo's widgetInstance function.
However, in angular's link function, the widget is not yet created (line 3).
1.
link: (scope:, element, attrs) =>{
2.
// widget is undefined
3.
var
widget = kendo.widgetInstance(element, kendo.dataviz.ui);
4.
scope.$on(
'kendoWidgetCreated'
, (r, t) =>{
5.
// widget is defined, how to check that widget2 === element?
6.
var
widget2 = <kendo.dataviz.ui.Chart>kendo.widgetInstance(element, kendo.dataviz.ui);
7.
});
8.
}
I've read about the kendoWidgetCreated event; when using this, there are 2 issues (line 7):
- the event is fired for every widget that is created within the scope; how to check that element === widget without depending on id's?
- when using an isolated scope , the event is not fired on this isolated scope
Thanks for your time,
Koen