【发布时间】:2020-08-20 14:58:00
【问题描述】:
查看代码...
<input type="text" ng-model="My.VarInScope1" />
<input type="text" ng-model="My.VarInScope2" />
和 angularjs
var varname = 'My.VarInScope1';
$scope.varname = 'Hi'; ????
$scope[varname] = 'Hi'; ????
我该怎么做?
感谢和问候。
【问题讨论】: