我正在使用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中更改这些设置时,它们会得到apply。
你知道怎么让它工作吗?
发布于 2015-11-05 20:47:04
传递gridsterOptions完成了这件事:
<div gridster="gridsterOptions">https://stackoverflow.com/questions/33413725
复制相似问题