【问题标题】:AngularJs Gridster Options IssueAngularJs Gridster 选项问题
【发布时间】:2015-10-29 12:03:39
【问题描述】:

我正在使用 AngularJS Gridster :- https://github.com/ManifestWebDesign/angular-gridster

在我的控制器中,我尝试初始化一些属性:-

var app = angular.module('appDashboard', ['gridster', 'ui.bootstrap']);

app.controller('DashboardCtrl', ['$scope', '$timeout', '$modal',
    function ($scope, $timeout, $modal) {

    $scope.gridsterOptions = {
                margins: [20, 20],
                columns: 4,
                draggable: {
                    enabled: false
                }
            };
....
}

加载 gridster 时,这些设置不适用。当我直接在.js 中更改这些设置时,它们会被应用。

知道如何让它工作吗?

【问题讨论】:

  • 有机会分享您的一些观点吗?您如何将这些设置传递给 gridster?

标签: angularjs gridster


【解决方案1】:

通过gridsterOptions 做了这件事:-

<div gridster="gridsterOptions">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-03
    • 2018-09-21
    • 2013-04-21
    • 2019-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多