JSFiddle - React, Tailwind, and code Playground
HTML
<div my-directive new-info="onChange(changedVal)"></div>
JavaScript
angular.module('myApp')
.controller('MainCtrl', function ($scope, $http, $filter, filterControl) {
$scope.onChange = function(changedVal) {
$scope.myPick = changedVal;
console.log("hit");
};
})
.directive('myDirective', function ($http, filterControl) {
return {
template: '<div id="map"></div>',
restrict: 'EA',
scope: {
newInfo: "&"
},
link: function (scope, element, attrs) {
function selected(info){
scope.newInfo = info;
console.log(info);
}
}
};
});