I have a Jssor slider which is running fine with the jQuery version. But when I put the code and JS files into my AngularJS app, it is not working. I get the following error in my console:

我有一个Jssor滑块,它与jQuery版本运行良好。但是当我将代码和JS文件放入我的AngularJS应用程序时,它无法正常工作。我在控制台中收到以下错误:

Uncaught TypeError: Cannot read property 'currentStyle' of undefined

未捕获的TypeError:无法读取未定义的属性“currentStyle”

Is there any specific way to work with Jssor slider in AngularJS?

在AngularJS中有没有使用Jssor滑块的特定方法?

var app = angular.module('slider', []);

app.controller('sliderCtrl', function($scope){
  this.slides = [
    {heading: 'movies', number: 115, panel: 'panel-green'},
    {heading: 'viewed', number: 252 , panel: 'panel-primary'},
    {heading: 'streams', number: 354 , panel: 'panel-yellow'},
    {heading: 'length', number: 471 , panel: 'panel-green'},
    {heading: 'Spent', number: 589, panel: 'panel-red'},
    {heading: 'viewed two', number: 789 ,panel: 'panel-yellow'},
    {heading: 'streams two', number: 412 , panel: 'panel-green'},
    {heading: 'length two', number: 456, panel: 'panel-red'}    
  ];
  $scope.data = this;
});
<div id="wrapper">
    <div class="row" id="page-wrapper" ng-controller="sliderCtrl">
        <div id="slider1_container">
            <div u="slides" class="slides" class="col-lg-2 col-custom-lg-2 col-md-4">
                <div ng-repeat="div in data.slides" class="panel {{div.panel}}">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">                               
                            </div>
                            <div class="col-xs-12 text-right">
                                <div class="huge">{{div.number}}</div>
                                <div >{{div.heading}}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div> 
            <span u="arrowleft" class="jssora03l arrowleft"></span>            
            <span u="arrowright" class="jssora03r arrowright"></span>        
        </div>
    </div>

更多相关文章

  1. Typeahead 0.10.2没有在Rails 4 / Bootstrap 3应用程序中显示建
  2. 在Rails应用程序中结合Scriptaculous和JQuery
  3. Web 应用程序学习笔记
  4. Wordpress网站上的亚马逊链接无法正确打开亚马逊应用程序
  5. 为什么我不用Javascript和Javascript HTML模板构建整个Web应用程
  6. 维护Java应用程序的多种形式的用户指南
  7. HTML5 的应用程序缓存和优势
  8. 如何在应用程序中嵌入图像并在HTML控件中使用它们?
  9. 通过SSH将MySQL绑定到本地端口——在控制台工作,而不是通过Mac OS

随机推荐

  1. Android7.0中文文档(API)-- AdapterView.On
  2. Android Button的背景图片拉伸变形解决方
  3. 好久米有碎碎念啦 android how to click
  4. 2020-08-07
  5. 关于Android的Activity的onCreate多次调
  6. 【Android】_MyContentProvider_外部访问
  7. Android日记之三
  8. Android中各种Span的用法
  9. android studio软件下载地址
  10. Android 浏览网页