Controllers are the most important part of AngularJS. They are responsible for controlling the data of the application.
Controllers are defined using the ng-controller directive.
Example:
{{message}}
function MyController($scope) {
$scope.message = “Hello World!”;
}