Get the attribute value of the tag dynamically in angularjs directive (you need to bind a changed model)

1.angularjs directive defines a comparison function that gets the incoming value dynamically and calls this method as soon as the input box changes. The
code is as follows:

 .directive("lessThan",[function () {
            return {
                require: "ngModel",
                restrict: "A",
                priority:"9",
                link: function ($scope, element, attrs, ctrl) {

                    var lessThan = function (inputValue) {
                        inputValue = inputValue || "";
                        console.log($scope[attrs.lessThan]);
                        if(attrs.lessThan){
                            if(inputValue>attrs.lessThan){
                                inputValue = ""
                            }
                        }

                        return Number(inputValue);
                    };

                    ctrl.$parsers.unshift(lessThan);

                    lessThan($scope[attrs.ngModel]);

                }
            };
        }])

in html:

<input
        type="text"
        ng-model="hopeCostRate"
        less-than = "{{proposal.hopeRate}}"
        >

problem encountered: proposal.hopeRate is another model, but each change can not get this value, always "", do not know how to solve. Call for help ~

Jun.20,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf06e5-3153e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf06e5-3153e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?