Having trouble passing the selected value from my tab to my $scope object. Here's the snippet of my HTML code.
<div ng-controller="RouteController">
<select ng-model="selector" ng-options="opt as opt.label for opt in options">
</select>
<button ng-click="selectFn()">Go</button>
</div>
Below is my JS code.
sampleApp.controller('RouteController', function($scope){
$scope.options=[
{label: '1', url:'1.html'},
{label: '2', url:'2.html'}
];
$scope.selectFn = function($scope){
alert("selector");
}
});
Struggling to pass the selected item's value to the alert function.