使用 ng-repeat 生成选择选项(附 Demo) [英] Using ng-repeat to generate select options (with Demo)

查看:21
本文介绍了使用 ng-repeat 生成选择选项(附 Demo)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

控制器:

$scope.send_index = function(event, val){控制台日志(val);$scope.variable = 'vm.areas['+val+'].name';console.log( $scope.variable );};

这是在视图中:

 一起使用的正确方法; AngularJS 中的元素: