AngularJS: angular.extend with example