将设置传递给光滑的轮播指令角度不起作用

时间:2016-05-17 09:06:46

标签: angularjs

我正在尝试将光滑的旋转木马整合到模型上的角度应用中。 Slick已经有了一个指令,所以我在html中唯一需要做的就是:

  <slick    settings="slickConfig" >
                            <div class="slider-for-item">

                                <img src="/Content/images/condo/condo-1.jpg">

                            </div >
                            <div class="slider-for-item">
                                <img src="/Content/images/condo/condo-2.jpg">
                            </div>
                            <div class="slider-for-item">
                                <img src="/Content/images/condo/condo-3.jpg">
                            </div>
                        </slick>

好的,所以它有效。但现在,如果我想传递一些设置,将它们作为属性添加到元素上 这也有效,但我想从我的角度应用程序传递这些设置,而不是在html里面有任何关于如何做这个的建议?试图传递这样的设置:

    cdkApp.controller('buildingDetailsPopupController',   ["$scope","$uibModalInstance",
    function ($scope, $uibModalInstance) {
    $scope.cancel = function () {
        $uibModalInstance.dismiss('cancel');
    };

    $scope.slickConfig = {
         autoplay: true,
        autoplaySpeed: 2000
    };
}]);

调用模态窗口

   controller.buildingDetailsPopup = function () {
    var modalInstance = $uibModal.open({
        templateUrl: "/app/View/Partials/_buildingDetailsPopup.html",
        controller: 'buildingDetailsPopupController',
        size: 'lg'

    });

0 个答案:

没有答案