我正在使用此代码自动生成控件
var link = function ($scope, $element, $attrs, ctrl) {
var view = '';
var newElem = $("<app-" + $scope.field.type.view + "-component/>");
newElem.attr("ng-model", "$parent.entity[field.name]");
newElem.attr("ng-show", "field.visible");
if ($scope.field.name == "IsBankOfAmerica") {
newElem.attr("ng-change", "$scope.BOA_Flag($scope.fields)");
}
但属性“ng-change”我想在输入控件上添加它但是现在已经在div上添加了,我如何添加输入?