You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
hppycoder commentedon Jan 30, 2015
@YaroslavLyzlov - Can you view this file and let me know if it doesn't cover your example.
http://plnkr.co/edit/PNLjDEaRKtpLgGZMJypk?p=preview