Angular was designed to allow the web creators to separate the displaying logic from the application logic without having to have greater knowledge of programming. For that purpose, Angular uses design pattern Model-View-Controller or the alternative Model-View-ViewModel. With the help of this abstract separation is most of the application logic in a model or controller. The model or controller is then inserted into $scope of the view template. That can then use defined variables and with the usage of special directives to list them and even manipulate with them in any way possible.
Angular also looks after changes, which are ongoing on variables defined for the given $scope. That is possible thanks to the usage of dirty-checking, which takes care of control, whether the new value does not differs from the old one. If the value of the variable changes, Angular assures, that it is really necessary to change DOM and then actualizes view template to the newest state. The functionality contributes to the fact, that there is no need to take care of repeated portraying and watch changes and it is enough to focus on final look of the app.
Angular uses own implementation scope. Scope, thanks to that, holds the references on every actual variables, which are defined on it and also on the DOM part, with which it currently works. The access provides Scope variable, which is defined in controller.
Angular uses controllers for its work. Each is connected to HTML DOM with the help of directive ng-controller. Each controller has its own $scope for its work. In it are saved values and objects, with which it then can work.
Controllers are used for:
For other cases can be used specialized components Angular. Those then enable the communication between the controller and view model.