添加代码输入的ng-change

时间:2017-10-28 14:50:39

标签: angularjs frontend

我正在使用此代码自动生成控件

 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上添加了,我如何添加输入?

enter image description here

0 个答案:

没有答案