<div ng-controller="templatesController"> <div sm-search-slider="$parent.showSearch" class="pull-left col-md-5 sm-search-list" ng-controller="templatesSearchController">And the templatesSearchController has the following code
app.controller('templatesSearchController', ['$scope', '$rootScope', '$timeout', '$state', 'templatesService', 'searchScreenService', function ($scope, $rootScope, $timeout, $state, templatesService, searchScreenService) { var init = function () { doSearch(); }; $scope.toggleSearchVisibility = function () { $scope.$parent.showSearch = !$scope.$parent.showSearch; }; $scope.table = searchScreenService.getTable('Descrip', [ { name: 'Descrip' }, { name: 'TmplType' } ]); var doSearch = function (keepForm) { $scope.alertType = ''; var loadingTimeout = $timeout(function () { $scope.results = null; $scope.isSearchLoading = true; }, 250); var queryRequest = searchScreenService.getQueryRequest(); if ($scope.table.isSimpleSearch()) { queryRequest['IsSimpleSearch'] = true; queryRequest['SimpleSearch.SimpleSearchField'] = $scope.simpleSearch; } else { queryRequest['IsSimpleSearch'] = false; queryRequest['AdvancedSearch.Descrip'] = $scope.descrip; queryRequest['AdvancedSearch.Hidden'] = $scope.showHidden; } templatesService.getTemplates(queryRequest).then(function (data) { $scope.results = data.list; if (data.totalCount < 1) { $scope.alertType = 'info'; $scope.alertMessage = 'Search returned 0 results.'; } if (data.totalCount == 1 && !keepForm) { $scope.loadView($scope.results[0]); } $scope.table.pageCount = data.pageCount; $scope.table.pageSize = data.pageSize; $scope.table.pageNumber = data.pageNumber; $scope.table.totalCount = data.totalCount; $rootScope.$broadcast('sm:resizeContainer'); $scope.isSearchLoading = false; $timeout.cancel(loadingTimeout); }); }; $scope.selectPage = function (page) { if ($scope.table.pageNumber != page) { $scope.table.pageNumber = page; doSearch(); } }; $scope.doSimpleSearch = function () { $rootScope.$broadcast('sm:hideForm'); $scope.table.resetTable(); doSearch(); }; $scope.doAdvancedSearch = function () { $rootScope.$broadcast('sm:hideForm'); $scope.table.resetTable(); doSearch(); }; $scope.toggleDisplayMode = function () { $scope.table.toggleDisplayMode(); }; $scope.loadView = function (template) { $state.go('edit', { id: template.templateID }); $rootScope.$broadcast('sm:focus'); }; $scope.new = function () { $state.go('new', {}, { reload: true }); }; $scope.$on('templates:doSearch', function (event, keepForm) { doSearch(keepForm); }); $scope.search = function () { doSearch(); }; init(); }]);So, this seems to be the line of interest:
$scope.table = searchScreenService.getTable('Descrip', [ { name: 'Descrip' }, { name: 'TmplType' } ]);I think I need to first check searchScreenService service code and then it may be clearer if I can just change the names in that code to what I want or not.