Angular API DATA CONNECTION
Created by: Gausul
function SearchCtrl($scope, $http) {
$scope.url = '= base_url() ?>index.php/counselor/search_knowledge';
// $scope.url = '= base_url() ?>index.php/counselor/online_counselling';
$scope.search = function() {
$http.post($scope.url, { "data" : $scope.keywords}).
success(function(data,status) {
$scope.status = status;
$scope.data = data;
$scope.result = data;
})
.
error(function(data, status) {
$scope.data = data || "Request failed";
$scope.status = status;
});
};
}
This Code we want to be use in place of data access multiple value like name,description, sub name and match to key words because keyword use for match