I am encountering an issue in graph.component.ts
this.cContainer = cytoscape ( {
ready: function(e) {
this._dataService.setResultData();
}
});
However, I am getting the following error message:
ERROR TypeError: Cannot read property 'setResultData' of undefined
It appears that this
is unrecognized, which makes sense since I am within a callback and this
refers to the ready
-callback.
How can I properly call _dataService.setResultData()
from inside this ready()
-callback?