var createNew = function (createDaily) { $scope.selections.selectedId = 0; $scope.selections.typeDescription = ''; if ($scope.searchParameters.departmentId != 0) { window.console && console.log('Going to department state...') $state.go('department', { departmentId: $scope.searchParameters.departmentId, createDaily: createDaily }, { reload: true, inherit: true, notify: true }); } if ($scope.searchParameters.categoryId != 0) { window.console && console.log('Going to category state...') $state.go('category', { categoryId: $scope.searchParameters.categoryId, createDaily: createDaily }, { reload: true, inherit: true, notify: true }); } if ($scope.searchParameters.itemId != 0) { window.console && console.log('Going to item state...') $state.go('item', { itemId: $scope.searchParameters.itemId, createDaily: createDaily }, { reload: true, inherit: true, notify: true }); } if ($scope.searchParameters.subCategoryId != 0) { window.console && console.log('Going to subCategory state...') $state.go('subCategory', { subCategoryId: $scope.searchParameters.subCategoryId, createDaily: createDaily }, { reload: true, inherit: true, notify: true }); } if ($scope.showSearchControls) { window.console && console.log('Going to new state...') $state.go('new', {}, { reload: true }); } // $scope.$parent.showSearch = false; // hide the search form }What am I supposed to change it to?