Skip to content

Instantly share code, notes, and snippets.

@jcieslar
Created May 19, 2015 08:46
Show Gist options
  • Save jcieslar/0de4c31b1bdfc624089e to your computer and use it in GitHub Desktop.
Save jcieslar/0de4c31b1bdfc624089e to your computer and use it in GitHub Desktop.
Console log
$scope.foo = { a: [1, 2, 3] }
console.log "foo", $scope.foo
# foo Object {a: Array[3]}a: Array[3]0: 22 1: 33 2: 44 length: 3__proto__: Array[0]__proto__: Object
console.log "foo.a", $scope.foo.a
# article_ctrl.js?body=1:23 foo.a [1, 2, 3]
angular.extend($scope.foo, { a: [22, 33, 44] })
################################################
foo = { a: [1, 2, 3] }
console.log "foo", foo
# foo Object {a: Array[3]}a: Array[3]0: 22 1: 33 2: 44 length: 3__proto__: Array[0]__proto__: Object
console.log "foo.a", foo.a
# article_ctrl.js?body=1:23 foo.a [1, 2, 3]
foo.a = [22, 33, 44]
###############################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment