您好,感谢您抽出宝贵时间阅读本文。
我试图在tab-dash.html页面上安装SlideBox并遇到一些错误。我按照网站上的说明操作,似乎无法使其正常运行。
这是我在浏览器中调试时遇到的错误:
ionic.bundle.js:25510 ReferenceError: fade is not defined
at new <anonymous> (http://localhost:8100/js/controllers.js:6:11)
at invoke (http://localhost:8100/lib/ionic/js/ionic.bundle.js:17630:17)
at Object.instantiate (http://localhost:8100/lib/ionic/js/ionic.bundle.js:17638:27)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:22194:28
at self.appendViewElement (http://localhost:8100/lib/ionic/js/ionic.bundle.js:56747:24)
at Object.switcher.render (http://localhost:8100/lib/ionic/js/ionic.bundle.js:54859:41)
at Object.switcher.init (http://localhost:8100/lib/ionic/js/ionic.bundle.js:54779:20)
at self.render (http://localhost:8100/lib/ionic/js/ionic.bundle.js:56607:14)
at self.register (http://localhost:8100/lib/ionic/js/ionic.bundle.js:56565:10)
at updateView (http://localhost:8100/lib/ionic/js/ionic.bundle.js:62210:23) <ion-nav-view name="tab-dash" class="view-container tab-content" nav-view="active" nav-view-transition="android">(anonymous function) @ ionic.bundle.js:25510(anonymous function) @ ionic.bundle.js:22289invokeLinkFn @ ionic.bundle.js:21832nodeLinkFn @ ionic.bundle.js:21330compositeLinkFn @ ionic.bundle.js:20721publicLinkFn @ ionic.bundle.js:20596tabSelected @ ionic.bundle.js:63739Scope.$digest @ ionic.bundle.js:28863Scope.$apply @ ionic.bundle.js:29131done @ ionic.bundle.js:23544completeRequest @ ionic.bundle.js:23716requestLoaded @ ionic.bundle.js:23657
这是我的tab-dash.html
<ion-content class="padding">
<ion-slides options="options" slider="data.slider">
<ion-slide-page>
<div class="box blue"><h1>BLUE</h1></div>
</ion-slide-page>
<ion-slide-page>
<div class="box yellow"><h1>YELLOW</h1></div>
</ion-slide-page>
<ion-slide-page>
<div class="box pink"><h1>PINK</h1></div>
</ion-slide-page>
</ion-slides>
// the rest of the page ...
这是我的controllers.js(当我插入此代码时,整个页面消失,当我删除效果时:淡入淡出,代码行返回滑块而没有滑动功能)
angular.module('starter.controllers', [])
.controller('DashCtrl', function($scope, $ionicSlideBoxDelegate) {
$scope.options = {
loop: false,
effect: fade,
speed: 500,
}
$scope.data = {};
$scope.$watch('data.slider', function(nv, ov) {
$scope.slider = $scope.data.slider;
})
})
// other controllers here ...
有关如何使其正常工作的任何提示?
我真的很感谢你们帮助我,因为这对我来说非常重要。
再次感谢你。
此致
亚当
答案 0 :(得分:0)
因此,当您添加SlideBox指令时,您必须在终端中再次离子服务应用程序。我希望这会持续下去。