Angular factory for binding the DOM to the scope.