In this AngularJS basic example you will learn what is controller and how to create controller in AngularJS. A controller is a simple Javascript function that is used to build a model for the view.
Here you can view the output of the example and you can also "try it yourself" by clicking on "Live Demo" button given at the bottom.
Syntax1
Syntax2
Syntax3
Access controller in DOM element