For example, I write a scope like this in a jsp or html file:
<input type="text" ng-model="bb.hello"/>
Then in js, if I want to add an attribute to bb, how should I write it?
In js, if you write directly
bb.a="sdfd";
Just report the error.
So how to write something that fits this kind of thing?
PHP中文网2017-05-15 17:04:12
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.