JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="dr" ng-controller="testCtrl">
    <test color1="color1" data-method="ctrlFn"></test>    
</div>

JavaScript

var app = angular.module('dr', []);

app.controller("testCtrl", function($scope) {
    $scope.ctrlFn = function(arg) {        
        alert(arg);
    }
    
});
app.directive('test', function() {
    return {
        restrict: 'E',
        scope: {
            fromDirectiveFn: '=method'
        },
        link: function(scope, elm, attrs) {
            //Way One
            scope.hello = "some message";
            scope.fromDirectiveFn(scope.hello);
        }
    }
});