我需要覆蓋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
請問我能得到一些關於這方面的指導嗎?
您正在收到的問題是由您在自己的模塊中定義自己的ionRefresher指令引起的。如果你想覆蓋現有的指令(我建議不要),你需要在離子模塊 – thomaux
上這樣做,我基本上只是想擴展它。我想讓離子複習的一切都減去它的模板。我不介意用自定義指令替換它,或者我應該說我寧願更喜歡,如果我能像離子複習那樣得到它的工作方式。 –
@Anzeo:我應該怎麼做? –