Skip to content

Instantly share code, notes, and snippets.

@jhiemer
Created February 22, 2013 13:21
Show Gist options
  • Save jhiemer/5013334 to your computer and use it in GitHub Desktop.
Save jhiemer/5013334 to your computer and use it in GitHub Desktop.
$scope.initUser = function(id) {
$scope.user = {};
if (id !== undefined) {
$scope.user = user.get();
} else {
$scope.user = {};
$scope.user.addresses = [];
$scope.user.addresses.push({});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment