add front end button toggeling
This commit is contained in:
parent
2738141f21
commit
7139c2d38c
1 changed files with 6 additions and 1 deletions
7
nodejs/public/javascripts/angularApp.js
vendored
7
nodejs/public/javascripts/angularApp.js
vendored
|
@ -41,9 +41,14 @@ app.controller('MainCtrl', ['$scope', 'arduino', function ($scope, arduino){
|
||||||
|
|
||||||
$scope.RCs = arduino.RCs;
|
$scope.RCs = arduino.RCs;
|
||||||
|
|
||||||
$scope.irTest = function(){
|
for (var i = $scope.RCs.length - 1; i >= 0; i--) {
|
||||||
|
$scope.RCs[i].state = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.irTest = function(RC){
|
||||||
|
|
||||||
arduino.irTest();
|
arduino.irTest();
|
||||||
|
RC.state = (RC.state) ? false : true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue