Jenis input menunjukkan objek 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']];
}
})
}
}
})
Enchanting Eel