84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
例如,我在jsp或者html文件中如此写一个作用域:<input type="text" ng-model="bb.hello"/>
然后在js中,我如果想给bb添加一个属性该如何写呢?
在js中,如果直接写
bb.a="sdfd";就回报错的。那么该如何写符合这种东西呢?
欢迎选择我的课程,让我们一起见证您的进步~~
$scope.bb.a = "sdfd";
As far as writing is concerned, if a variable in HTML, such as bb, reaches the controller, it needs to be preceded by $scope., which is $scope.bb.
As far as writing is concerned, if a variable in HTML, such as bb, reaches the controller, it needs to be preceded by $scope., which is $scope.bb.