Technical FAQ on AngularJS


Here are the few technical questions that are easily asked about AngularJS.

Is it possible to download the angularJS source and use it within the local system.?

Yes you can download and use the source file into your local system and use it.

Down the min.js for this instance by entering the above url into your browser. Download the file and define the same location into the script tag.


What is the difference between one way binding and two way binding ?

One way binding is one where the scope variable in the HTML will be assigned to particular value initially, and when the variable is called it is bound to display that value.

(model($scope)–> view)

In the two way binding the scope variable will change its value every time the server is assigned to a different value.

model($scope) >> view & view >> model($scope)

How to use the scope for AngularJS ?

When you make the controller in AngularJS you will pass the scope object as on argument

<div ng-app=”testad” ng-controller=”myCtrl”>

var app = angular.module(‘testad’, [ ]);
app.controller(‘myCtrl’, function($scope) {
$scope.carname = “Honda”;

What are AngularJS controllers?

A controller is a javascript object created by a standard javascript object constructor.

The ng-controller defines the application controller.

AngularJS applications are controllers that are controller by controllers.


The example of how a controller can be used within angular JS is shown as below.


<script src=””></script>
<div ng-app=”myApp” ng-controller=”myCtrl”>
First Name: <input type=”text” ng-model=”firstName”><br>
Last Name: <input type=”text” ng-model=”lastName”><br>
Full Name: {{firstName + ” ” + lastName}}


var app = angular.module(‘myApp’, []);
app.controller(‘myCtrl’, function($scope) {
$scope.firstName = “John”;
$scope.lastName = “Doe”;



How to use filters in AngularJS ?

The filters in the angularJS are

  • Currency
  • Date
  • Filter
  • Json
  • limitTo
  • Lowercase
  • Number
  • Orderby
  • Uppercase

The filters are added to expressions using the pipe character.


<script src=””> </script>
<div ng-app=”myapp” ng-controller=”mycont”>
<p>My Name is {{ myname | uppercase }}</p>


angular.module(‘myapp’, []).controller(‘mycont’,function($scope)
$scope.myname = “winston”


</html >

It will output as

My Name is WINSTON

How to validate a Email via AngularJS ?

There must be a validation process for every instance that is entered in the from. The angular JS lets it do instantly.
Let us see how a Email can be validated here


<script src=””></script>
<body ng-app=”">
<p>Try writing an E-mail address in the input field:</p>
<form name=”demoform”>
<input type=”email” name=”email” ng-model=”email1″>
<p>The Email is :</p>

It will output as

The Email is :


How to include HTML content using Angularjs directives?

The HTML content can be included in the AngularJS directives using the ng-include directives as shown below.


<script src=””>
<body ng-app= ” ” >
<div ng-include=”test.html”></div>

When you run the above file the, The content in the test.html will be included.

What is a service is AngularJS.?

In Angular JS a function is a object that is available for and limited to your AngularJs application. AngularJS has the 30 built in services

The services are as listed below.

  • $anchorScroll
  • $animate
  • $animateCss
  • $cacheFactory
  • $templateCache
  • $compile
  • $controller
  • $document
  • $exceptionHandler
  • $filter
  • $httpParamSerializer
  • $httpParamSerializerJQLike
  • $http
  • $xhrFactory
  • $httpBackend
  • $interpolate
  • $interval
  • $jsonpCallbacks
  • $locale
  • $location
  • $log
  • $parse
  • $q
  • $rootElement
  • $rootScope
  • $sceDelegate
  • $sce
  • $templateRequest
  • $timeout
  • $window

HostingRaja is one of the leading domain provider in india, Please buy domain name from us or get it for free when you buy any hosting plans.