Angularjs works on model-view-controller pattern. Angularjs Controllers have three responsibilities in your app:
- Set up the initial state in your application’s model
- Expose model and functions to the view (UI template) through $scope
- Watch other parts of the model for changes and take action