I am trying to pass a dynamic parameters to a modal by clicking a button, but some values are not in place, always returning an empty value.
here is my modal snippet:
<div id="<%handler%>" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title"><%header%></h4>
            </div>
            <div class="modal-body">
                <p><%body%></p>
                <form class="form main_grid_contact" name="orderForm">
                    <input type="hidden" name="order" value="<%orderPublic%>">
                    <div class="form-group">
                        <input class="form-control" type="text" name="fullname" placeholder="Fullname">
                    </div>
                    <div class="form-group">
                        <input class="form-control" type="text" name="telephone" placeholder="Telephone">
                    </div>
                    <div class="form-group">
                        <input class="form-control" type="email" name="pass" placeholder="E-mail">
                    </div>
                    <div class="input-group1">
                        <input type="submit" name="order" class="form-control" value="Order">
                    </div>
                </form>
            </div>
            <div class="clearfix"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger btn-block" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
I've created a directive that makes it easy to pop up the modal:
app.controller('orders.controller', function ($scope, $log) {
    $scope.header = '';
    $scope.body = '';
    $scope.footer = '';
    $scope.orderPublic = '';
    $scope.addProduct = function (orderId) {
        $scope.orderPublic = orderId;
    }
});
app.directive('modal', function () {
    return {
        restrict: 'EA',
        scope: {
            title: '=modalTitle',
            header: '=modalHeader',
            body: '=modalBody',
            footer: '=modalFooter',
            callbackbuttonleft: '&ngClickLeftButton',
            callbackbuttonright: '&ngClickRightButton',
            handler: '=lolo'
        },
        templateUrl: '/static/snippets/modal.html',
        transclude: true,
        controller: function ($scope) {
            $scope.handler = 'pop';
        },
    };
});
Here is the controller:
<div class="row" id="ads" ng-controller="orders.controller">
    <div class="col-md-4">
        <div class="card rounded">
            <div class="card-body text-center">
                <div class="ad-title m-auto">
                    <h5>Honda Accord LX</h5>
                </div>
                <a href="#<%modal1%>" ng-click="addProduct('02f73a06-163a-4d6f-8ca7-c6bac8ca7a46')" role="button" data-toggle="modal" class="ad-btn">View</a>
            </div>
        </div>
    </div>
</div>
<modal lolo="modal1" modal-body="body" modal-footer="footer" modal-header="header" data-ng-click-right-button="myRightButton()"></modal>
The modal is poping up successfully, the scope parameters are in place except the orderPublic, the hidden input is empty, even i am passing it to the function and i can see the passed value inside the console
 
     
    