Simran Kaur Simran Kaur - 8 days ago 7
AngularJS Question

remove ion refresher blue background

I need to override the

ionRefresher
directive so that when it is pulled down, It should not show any loading signs.

Is that possible to do?

I tried doing this:

.directive('ionRefresher', function() {
return {
template: '<div></div>'

};
})


I have set it up like this:

<ion-refresher
pulling-text=""
refreshing-text=""
refreshing-icon=""
pulling-icon=""
on-refresh="changeSlide()">
</ion-refresher>


But I still get background light blue color on pull down. I do not want that either. Can I change that?

Error: [$compile:multidir] Multiple directives [ionRefresher, ionRefresher (module: starter.controllers)] asking for template on: <div class="scroll-refresher invisible" collection-repeat-ignore="" pulling-text="" refreshing-text="" refreshing-icon="" pulling-icon="" on-refresh="changeSlide()">
http://errors.angularjs.org/1.4.3/$compile/multidir?p0=ionRefresher&p1=&p2=ionRefresher&p3=%20(module%3A<ion-nav-view name="menuContent" class="view-container" nav-view-transition="ios">tarter.controllers)&p4=template&p5=%3Cdiv%class%3D%scroll-refresher%invisible%22%20collection-repeat-ignore%3D%22%22%20pulling-text%3D%22%22%20refreshing-text%3D%22%22%20refreshing-icon%3D%22%22%20pulling-icon%3D%22%22%on-refresh%3D%changeSlide()%22%3E
at REGEX_STRING_REGEXP (http://localhost:8100/lib/ionic/js/ionic.bundle.js:8895:12)
at assertNoDuplicate (http://localhost:8100/lib/ionic/js/ionic.bundle.js:17251:15)
at applyDirectivesToNode (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16689:11)
at compileNodes (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16286:15)
at compileNodes (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16298:15)
at compileNodes (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16298:15)
at compileNodes (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16298:15)
at compile (http://localhost:8100/lib/ionic/js/ionic.bundle.js:16193:15)
at IonicModule.controller.self.appendViewElement (http://localhost:8100/lib/ionic/js/ionic.bundle.js:52247:18)
at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.render (http://localhost:8100/lib/ionic/js/ionic.bundle.js:50449:41)(anonymous function) @ ionic.bundle.js:21157ident.$get @ ionic.bundle.js:17936invokeLinkFn @ ionic.bundle.js:17479nodeLinkFn @ ionic.bundle.js:16977compositeLinkFn @ ionic.bundle.js:16368nodeLinkFn @ ionic.bundle.js:16972compositeLinkFn @ ionic.bundle.js:16368nodeLinkFn @ ionic.bundle.js:16972compositeLinkFn @ ionic.bundle.js:16368publicLinkFn @ ionic.bundle.js:16243IonicModule.controller.self.appendViewElement @ ionic.bundle.js:52259IonicModule.factory.ionicViewSwitcher.create.switcher.render @ ionic.bundle.js:50449IonicModule.factory.ionicViewSwitcher.create.switcher.init @ ionic.bundle.js:50369IonicModule.controller.self.render @ ionic.bundle.js:52115IonicModule.controller.self.register @ ionic.bundle.js:52073updateView @ ionic.bundle.js:57485(anonymous function) @ ionic.bundle.js:57462parent.$get.Scope.$broadcast @ ionic.bundle.js:24992$state.transitionTo.$state.transition.resolved.then.$state.transition @ ionic.bundle.js:44836processQueue @ ionic.bundle.js:23394(anonymous function) @ ionic.bundle.js:23410parent.$get.Scope.$eval @ ionic.bundle.js:24673parent.$get.Scope.$digest @ ionic.bundle.js:24484parent.$get.Scope.$apply @ ionic.bundle.js:24778done @ ionic.bundle.js:19191completeRequest @ ionic.bundle.js:19363requestLoaded @ ionic.bundle.js:19304


Can I please get some pointers on this?

Answer

No need to customize directive, just set spinner value none to disable both spinner or icon.

<ion-refresher
    spinner="none"
    on-refresh="changeSlide()">
</ion-refresher>