AngularJS Controller

To control the flow of data AngularJS mainly relies on controllers. It is defined using ng-controller directive. Controller contain attributes, properties and functions. Example of Controller: <html> <head> <title>AngularJS Controllers</title> <script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js”></script> </head> <body> <h2>AngularJS Controllers</h2> <div ng-app=”ngApp” ng-controller=”nameController”> First name: <input type=”text” ng-model=”name.firstName”><br><br> Last name: <input type=”text” ng-model=”name.lastName”><br> <br> Full name: {{name.fullName()}} </div> <script> […]