Skip to content

bind and $$hashKey #32

Open
Open

Description

@YaroslavLyzlov
app.controller('CreateCtrl', function ($scope) {
      $scope.create = {a:1, b:2, c:3};
      $scope.send = function () {
         $scope.$emit('send', angular.copy($scope.create));
      }
});
app.controller('ListCtrl', function ($scope, $rootScope) {
      $scope.list = [];
      $rootScope.$on('send', function (e, data) {
         $scope.list.push(data);
      });
}) ;

last element in $scope.list on LocalStorage does not have a $$hashKey if $scope.list bind to Storage. because of this error happens ng repeat dupes (duplicate)

Activity

  1. hppycoder commented on Jan 30, 2015

    @hppycoder
    Collaborator

    @YaroslavLyzlov - Can you view this file and let me know if it doesn't cover your example.

    http://plnkr.co/edit/PNLjDEaRKtpLgGZMJypk?p=preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions