diff --git a/js/angular/controller/refresherController.js b/js/angular/controller/refresherController.js index 86c34e3953f..b0118483f06 100644 --- a/js/angular/controller/refresherController.js +++ b/js/angular/controller/refresherController.js @@ -24,7 +24,9 @@ IonicModule $attrs.$set('pullingIcon', 'ion-android-arrow-down'); } - $scope.showSpinner = !isDefined($attrs.refreshingIcon); + $scope.showSpinner = !isDefined($attrs.refreshingIcon) && $attrs.spinner != 'none'; + + $scope.showIcon = isDefined($attrs.refreshingIcon); $ionicBind($scope, $attrs, { pullingIcon: '@', diff --git a/js/angular/directive/refresher.js b/js/angular/directive/refresher.js index 91e2c8a472d..06328e1bc8b 100644 --- a/js/angular/directive/refresher.js +++ b/js/angular/directive/refresher.js @@ -52,7 +52,8 @@ * Default: 'ion-android-arrow-down'. * @param {string=} spinner The {@link ionic.directive:ionSpinner} icon to display * after user lets go of the refresher. The SVG {@link ionic.directive:ionSpinner} - * is now the default, replacing rotating font icons. + * is now the default, replacing rotating font icons. Set to `none` to disable both the + * spinner and the icon. * @param {string=} refreshing-icon The font icon to display after user lets go of the * refresher. This is depreicated in favor of the SVG {@link ionic.directive:ionSpinner}. * @param {boolean=} disable-pulling-rotation Disables the rotation animation of the pulling @@ -76,7 +77,7 @@ IonicModule '
' + '
' + '' + - '' + + '' + '
' + '
' + '' + diff --git a/test/unit/angular/directive/refresher.unit.js b/test/unit/angular/directive/refresher.unit.js index d4f1123a013..3ac5d3b9813 100644 --- a/test/unit/angular/directive/refresher.unit.js +++ b/test/unit/angular/directive/refresher.unit.js @@ -88,10 +88,15 @@ describe('ionRefresher directive', function() { var el = setup(); expect(el[0].querySelector('ion-spinner')).toBeTruthy(); }); - it('should have spinner', function() { + it('should allow a custom spinner', function() { var el = setup('spinner="android"'); expect(el[0].querySelector('.spinner-android')).toBeTruthy(); }); + it('should allow spinner to be none', function() { + var el = setup('spinner="none"'); + expect(el[0].querySelector('ion-spinner')).not.toBeTruthy(); + expect(el[0].querySelector('.icon.icon-refreshing')).not.toBeTruthy(); + }); it('should allow custom refreshingIcon', function() { var el = setup('refreshing-icon="monkey-icon"'); expect(el[0].querySelector('.icon.icon-refreshing.ion-arrow-down-c')).toBeFalsy();