-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Description
When I define in a normal way my layoutOptions it works:
Controller
$scope.layoutOptions = { // layout with explicit save
storageId: 'demo-layouts-explicit-save',
storage: localStorage,
storageHash: 'fs4df4d51',
widgetDefinitions:[], // []
defaultWidgets: [],
explicitSave: true,
defaultLayouts: [
{title: 'Layout 1', active: true, defaultWidgets: []}
]
};
If I try via rest service way i get this $$hasKey problem
OtherService.then(function (allWidgets) {
$log.debug('allWidgets ', allWidgets);
$scope.layoutOptions = {};
$scope.layoutOptions.storageId = 'demo-layouts-explicit-save';
$scope.layoutOptions.storage = localStorage;
$scope.layoutOptions.storageHash = 'fs4df4d51';
$scope.layoutOptions.widgetDefinitions = allWidgets; // returns [{name:'widget1'},{name:'widget2'}]
$scope.layoutOptions.defaultWidgets = [];
$scope.layoutOptions.explicitSave = true;
$scope.layoutOptions.defaultLayouts = [
{title: 'Layout 1', active: true, defaultWidgets: []}
];
$log.debug('layoutOptions =',$scope.layoutOptions);
});
Log:
TypeError: Cannot read property '$$hashKey' of undefined
at Object.extend (http://localhost:9000/bower_components/angular/angular.js:406:14)
at Object.LayoutStorage (http://localhost:9000/bower_components/malhar-angular-dashboard/dist/malhar-angular-dashboard.js:1064:15)
at link (http://localhost:9000/bower_components/malhar-angular-dashboard/dist/malhar-angular-dashboard.js:628:31)
at invokeLinkFn (http://localhost:9000/bower_components/angular/angular.js:8194:9)
at nodeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7706:11)
at http://localhost:9000/bower_components/angular/angular.js:7937:13
at processQueue (http://localhost:9000/bower_components/angular/angular.js:13137:27)
at http://localhost:9000/bower_components/angular/angular.js:13153:27
at Scope.$eval (http://localhost:9000/bower_components/angular/angular.js:14353:28)
at Scope.$digest (http://localhost:9000/bower_components/angular/angular.js:14169:31) <div dashboard-layouts="layoutOptions" class="dashboard-container ng-scope">
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels