angular scope 怎么在控制器中查看dom属性

2025-05-20 18:24:04
推荐回答(1个)
回答1:

...
var msgList = [];
var appEditDeviceConfig = angular.module('aaaaa', [])
.controller('ccccc', function ($scope,$http) {
$scope.txtBox = '';
$scope.msgLis = msgList;
$scope.btnClk = function(){
var txt = $scope.txtBox;
msgList.push(txt);
console.log(msgList);
};
});
...