1
각도가 새롭고 막혔습니다.
this image에있는 자리 표시자를 텍스트 상자는 드롭 다운에서 선택한 옵션에 따라 다릅니다.각도로 표시 : 드롭 다운에서 옵션을 선택하는 중 해당 값으로 검색 필드에서 검색하고 싶습니다.
내 HTML 내 컨트롤러는 다음과 같이 정의된다
<select class="selectpicker" ng-options="search for search in searchCriteria" ng-model="searchWith">
<option value="">Select : </option>
</select>
<input type="text" ng-model="searchName" class="form-control" placeholder="Search with {{searchWith}}" />
입니다 :
var companyInfo = angular.module('companyInfo', []);
companyInfo.controller('searchExample', ['$scope', '$http',function($scope, $http){
$scope.searchCriteria = ['Name', 'Employee Id', 'Designation', 'Email','Phone No']
$http.get("data/data.json").then(function(data){
$scope.employeeDetails= data.data;
});
$scope.searchInTable = function(searchName){
$scope.searchVal = searchName;
}
}]);