Controllers in Angular provide the business logic to handle view behavior, for example responding to a user clicking a button or entering some text in a form. Additionally, controllers prepare the model for the view template.
As a general rule, a controller should not reference or manipulate the DOM directly. This has the benefit of simplifying unit testing controllers.