I have the following tabset and controller:
<tabset>
<tab>
<tab-heading>test</tab-heading>
<div>
<input type="text" class="form-control" data-ng-model="searchValue" data-ng-enter="search()" />
</div>
</tab>
<tab>...</tab>
</tabset>
app.controller('MyController', function($scope) {
$scope.search = function() {
var param = $scope.searchValue;
//param is undefined
};
}
In the above, $scope.searchValue is always undefined. I know this has something to do with the scope since if I remove the tabset, it works fine. I have seen other simliar posts that suggest adding an empty object to the controller, such as: $scope.searchValue = {};
I tried adding $scope.searchValue = ''
but this did not resolve my issue. Whats the solution? Thanks.