Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$$hashKey problem #156

Open
vladradulescu1 opened this issue Dec 21, 2015 · 0 comments
Open

$$hashKey problem #156

vladradulescu1 opened this issue Dec 21, 2015 · 0 comments

Comments

@vladradulescu1
Copy link

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">
@vladradulescu1 vladradulescu1 changed the title $$hasKey problem $$hashKey problem Dec 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant