How to attach functions to objects through directive parameters?

Let’s say I want to create dialogBox directive. i want to have some object to control behavior of this dialog.

Why I cant append open() function to $scope.directiveHandle? Why $scope.directiveHandle.open does not exist in ctrl controller?

angular.module('app', [])
.directive('dialogBox', function(){
    return {
        restrict: 'E',
        replace: true,
        template: '<div>{{ handle.text }}</div>',
        scope: {
            handle: '='
        },
        controller: function($scope){
            $scope.handle.open = function(){
                console.log('Open is executed');
            };
        }
    };
})
.controller('ctrl', function($scope){
    $scope.directiveHandle = {
        text: 'it's working'
    };
    console.log('Is open() attached?', $scope.directiveHandle.open);
});
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.8/angular.min.js"></script>
<body ng-app="app">
    <div ng-controller="ctrl">
        <h3>This is my directive</h3>
        <dialog-box handle="directiveHandle"></dialog-box>
    </div>
</body>

Source: New feed
Source Url How to attach functions to objects through directive parameters?