Answers for "input type shows object angularjs"

0

input type shows object angularjs

app.directive('labelField', function () {
    return {
        restrict: 'AE',
        link: function ($scope, element, attrs) {
            $scope.$watch(attrs['ngModel'], function (newValue) {
                if (newValue) {
                    element[0].value = newValue[attrs['labelField']];
                }
            })
        }
    }
})
Posted by: Guest on February-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language