If you are using AngularJS version >= 1.4.0 then you can use the extend feature like so:
angular.extend($scope.master, $scope.ownerDetails);
This will copy all the values from $scope.ownerDetails (or whatever place you are getting the owner details) to the $scope.master.
For Angular less than 1.4.0 you can workaround to inject your own extend method:
// This code is basically copied from AngualrJS 1.4.0 library
function baseExtend(dst, objs, deep) {
var h = dst.$$hashKey;
for (var i = 0, ii = objs.length; i < ii; ++i) {
var obj = objs[i];
if (!angular.isObject(obj) && !angular.isFunction(obj)) {
continue;
}
var keys = Object.keys(obj);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
var src = obj[key];
if (deep && angular.isObject(src)) {
if (angular.isDate(src)) {
dst[key] = new Date(src.valueOf());
} else {
if (!angular.isObject(dst[key])) {
dst[key] = angular.isArray(src) ? [] : {};
}
baseExtend(dst[key], [ src ], true);
}
} else {
dst[key] = src;
}
}
}
if (h) {
dst.$$hashKey = h;
} else {
delete dst.$$hashKey;
}
return dst;
}
angular.merge = function(dst) {
var slice = [].slice;
return baseExtend(dst, slice.call(arguments, 1), true);
};