<!DOCTYPE html>
<html>
<meta charset="utf-8">
<script src="https://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<style>
select{width:150px}
</style>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<ul style="list-style: none;">
<li ng-repeat="list in tablelist" sub-tem>
{
{roleValue[ $index ]}}
<select ng-change="typeChange($index,typeValue[ $index ])" ng-value="typeValue[ $index ]" ng-model="typeValue[ $index ]" ng-options="value.id as value.name for value in typeOptions"></select>
<select ng-change="roleChange($index,roleValue[ $index ])" ng-value="roleValue[ $index ]" ng-model="roleValue[ $index ]" ng-options="value.id as value.name for value in roleOptions[ $index ]"></select>
<select ng-change="ownerChange($index,ownerValue[ $index ])" ng-value="ownerValue[ $index ]" ng-model="ownerValue[ $index ]" ng-options="value.id as value.name for value in ownerOptions[ $index ]"></select>
</li>
</ul>
<a href="#" ng-click="getVal()">ddd</a>
</div>
<script>
var app = angular.module('myApp', []);
app.controller("myCtrl", ["$scope", function( $scope ){
$scope.typeValue = [];
$scope.roleValue = [];
$scope.ownerValue = [];
$scope.typeOptions =[{id:1,name:"sunny1"},{id:2,name:"sunny2"},{id:3,name:"sunny3"},{id:4,name:
循环里有多个表单空间该如何给model
最新推荐文章于 2021-12-10 17:38:12 发布