$scope.send_index = function(event, val){
console.log(val);
$scope.variable = \'vm.areas[\'+val+\'].name\';
console.log( $scope.var
This is not the correct way to use ng-model with a element in AngularJS:
There is no need to use the ng-click directive. The select directive handles that automatically. The ng-model directive receives or sets the chosen option.
See:
angular.module('ngrepeatSelect', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.data = {
model: null,
availableOptions: [
{id: '1', name: 'Option A'},
{id: '2', name: 'Option B'},
{id: '3', name: 'Option C'}
]
};
}]);
model = {{data.model}}