删除离子复习蓝色背景

时间:2015-09-07 07:04:31

标签: angularjs ionic

我需要覆盖ionRefresher指令,这样当它被拉下时,它不应该显示任何加载标志。

这可能吗?

我试过这样做:

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

  };
})

我已经设置了这样:

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

但我仍然可以在拉下时获得浅蓝色背景。我也不想要那个。我可以改变吗?

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

我能否就此提出一些建议?

3 个答案:

答案 0 :(得分:3)

无需自定义指令,只需设置spinnernone即可禁用微调器或图标。

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

答案 1 :(得分:0)

我的两分钱:使用spinner =“”用于抛出以下异常:

spinner error on ionic framework when using spinner =""

当我切换到:

<ion-refresher on-refresh="doRefresh(false, true)" ng-if="search.canBeLoaded"  refreshing-icon="">

并添加了以下css规则:

ion-infinite-scroll .spinner {
    display: none;
}

来自无限加载和刷新的两个微调器都没有按需显示。 希望它有所帮助。

答案 2 :(得分:0)

添加style.css

.loading-container .loading {background-color:black; } .spinner svg {stroke:#88C931;填写:#88C931; }