Question: how to send data from controller to directive in angularjs?
Answer: myApp. directive('kanbanComponent', function() {
return {
restrict: 'EA',
scope: {
component: '=data' // Two-way model binding from the controller.
},
controller: function($rootScope, $scope, ElasticAPI, $stateParams, $filter, sweet) {
console. log($scope. component)