Controllers in AngularJS

Applications in AngularJS are controlled by controllers. It controls the data of application. These are the JavaScript Object which holds attributes and functions. It is defined by ng-controller. It uses $scope as a parameter. $scope objects communicates with view and exposes model to the view.


<div ng-app = "" ng-controller = "controller_name">

Watch this TypeScript vs JavaScript Tutorial Video for Beginners:

AngularJS Controllers


<title>AngularJS Controller</title>
<script src = ""></script>
<h2>Example of AngularJS Controllers </h2>
<div ng-app="details" ng-controller="employeecontroller">
Id: <input type="text" ng-model="id"><br><br>
Name: <input type="text" ng-model="name"><br>
Details of Employee: {{id + " " + name}}
var e = angular.module('details', []);
e.controller('employeecontroller', function($scope) {
$ = 20;
$ = "abc";


Course Schedule

Name Date
Web Development Courses 2022-05-28 2022-05-29
(Sat-Sun) Weekend batch
View Details
Web Development Courses 2022-06-04 2022-06-05
(Sat-Sun) Weekend batch
View Details
Web Development Courses 2022-06-11 2022-06-12
(Sat-Sun) Weekend batch
View Details

Leave a Reply

Your email address will not be published. Required fields are marked *

Find Best AngularJS Training in Other Regions

Bangalore Hyderabad Chennai Mumbai