I have a simple scenario which i'm trying to figure out.
I have a controller (which is bounded to a dialog). The controller looks like that:
app.controller('fullCtrl', function ($scope, $dialog, $http, $log, apiService, stateService, promiseData, dialog, leaf, CONST) {
...
}
one of the ui elements on the dialog is a canvas that is being rendered using a directive:
<div leaf-graph structure=structure></div>
app.directive('leafGraph', ['$timeout', function (timer, $log) {
...
}
The issue is that i'm looking for a way for the directive to interact with the controller, so when a user click on the directive, the controller rebinds itself to a new data.
Basically, its all done in the javascript side, where the user double click on some areas on the canvas, its should trigger some actions on the controller.
is there any way to pass the controller to the directive?
Thx