'use strict'; //Load controller angular.module('acuefuel') .controller('fboClientsController', function($scope, $stateParams, FBOClient) { $(document).ready(function(){ $('.tab-pane').slimScroll({ height: '600px' }); }); $('#tab-2').css('display', 'none'); getAllFbo(); function getAllFbo(){ FBOClient.getALlFBOList().then(function(result) { console.log(result) $scope.fboClient = result; $scope.clientLength = result.length; }) } $scope.searchData = function(){ var userType = $('#tabClient > li.active > a').attr('id'); searchClient($scope.searchQuery, userType); } function searchClient(searchData, userType){ console.log(searchData) console.log(userType) var data = { "query" : searchData, "userType" : userType } FBOClient.getSearchClient(data).then(function(result) { for(var i=0; i