标签: javascript angularjs
这是angularJS和javascript代码:
var app = angular.module('app', []); app.controller('mainController', function ($scope) { var test = ["variable1","variable2"]; for(var i=0;i<test.length;i++){ $scope.+""+test[i] = 1; } });