AngularJS Interview Questions | Eklavya Online

AngularJS Interview Questions

What is $scope?

A $scope is an object that represents the application model for an Angular application. Each AngularJS application can have only one root scope but can have multiple child scopes. For example: var app = angular.module(‘myApp’, []); app.controller(‘myCtrl’, function($scope) { $scope.carname = “Volvo“; }); Some of the key characteristics of the $scope object are given below: …

What is $scope? Read More »

What do you know about injector?

An injector is referred to as a service locator. It is used to receive object instances as defined by the providers, invoke methods, instantiate types, and load modules. Each Angular application consists of a single injector which helps to look upon an instance by its name.

What do you understand by $watch?

In angularJS, $watch() function is used to watch the changes of variable in $scope object. Generally, the $watch() function is created internally to handle variable changes in the application. If there is a need to create custom watch for some specific action then it’s better to use $scope.watch function. The $scope.watch() function is used to …

What do you understand by $watch? Read More »

Is AngularJS dependent on JQuery?

AngularJS is a JavaScript framework with key features like models, two-way binding, directives, routing, dependency injections, unit tests, etc. On the other hand, JQuery is a JavaScript library used for DOM manipulation with no two-way binding features

What is the factory method in AngularJS?

Factory method is used for creating a directive. Whenever the compiler matches the directive for the first time, the factory method is invoked. Factory method is invoked using $injector.invoke. Syntax module.factory(‘factoryName’, function);

What are the different types of directives available in AngularJS?

AngularJS provides support for creating custom directives for the following type of elements: Element Directive Element directives are activated when a matching element is encountered. Attribute Attribute directives are activated when a matching attribute is encountered. CSS CSS directives are activated when a matching CSS style is encountered. Comment Comment directives are activated when a …

What are the different types of directives available in AngularJS? Read More »

What IDE’s are currently used for the development of AngularJS?

A term IDE stands for Integrated Development Environment. There are some IDE’s given below which are used for the development of AngularJS: Eclipse It is one of the most popular IDE. It supports AngularJS plugins. Visual Studio It is an IDE from Microsoft that provides a platform to develop web apps easily and instantly. WebStorm …

What IDE’s are currently used for the development of AngularJS? Read More »

How will you explain the concept of hierarchy? How many scopes can an application have?

Each Angular application contains one root scope, but there can be several child scopes. The application may have multiple scopes because child controllers and some directives create new child scopes. When the new scope is formed or created, it is added as a child of the parent scope. As similar to DOM, scopes also create …

How will you explain the concept of hierarchy? How many scopes can an application have? Read More »

Explain the compilation process of AngularJS?

Angular’s HTML compiler allows us to teach the browser, new HTML syntax. It also allows the developer to attach new behavior or attributes to any HTML element known as directives. AngularJS compilation process automatically takes place in the web browser. It does not contain any server-side or pre-compilation procedure. AngularJS uses <$compiler> service for the …

Explain the compilation process of AngularJS? Read More »

What are the features of AngularJS?

Some important features of AngularJS are given below: MVC- In AngularJS, you just have to split your application code into MVC components, i.e., Model, View, and the Controller. Validation- It performs client-side form validation. Module- It defines an application. Directive- It specifies behavior on the DOM element. Template- It renders the dynamic view. Scope- It …

What are the features of AngularJS? Read More »