function getValue(value, defaultValue) {
    return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;
  }
Provides read-only equivalent of jQuery's offset function:
http://api.jquery.com/offset/