angular.js - Input binding to ng-model in angularjs is invalid
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-06-05 11:09:51
0
1
819

Input two-way data binding has no effect. After binding ng-model, the monitoring events are not triggered. Masters, please help me. Please help me.
I have also tried the method of creating an object, but it doesn't work.

<p class="form-group">

<label class="col-sm-1 label-color">作业内容</label>
    <p class="col-sm-10">
        <span>
            <input class="from-input" id="workContent"   name='workContent'  ng-model='usernametest' ng-bind='{{usernametest}}'>
        </span>
    </p>
</p>

js.


$scope.usernametest = 'info';
$scope.$watch('usernametest', function() {
    console.log($scope.usernametest);
})
曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
滿天的星座

The tested code can be run.

Why don’t you post the complete code for a look?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template