You are on page 1of 28

AngularJS

www.codingtag.com

TOP 25
INTERVIEW QUESTIONS

www.codingtag.com
Q. What are the different versions
of Angular?
A. a) AngularJS
b) Angular 2
c) Angular 4
d) Angular 5
e) Angular 6 beta version

www.codingtag.com
Q. In which Year AngularJS was
developed?
A. 2010

www.codingtag.com
Q. If we want to bind the value of
HTML such as buttons, dropdown
list, test box from a database.
How we can bind it?
A. Through AngularJS

www.codingtag.com
Q. What is AngularJS?

A. AngularJS is a kind of JavaScript framework mainly used in


building web applications and more suitable for single page
applications. AngularJS is designed for binding JavaScript
object with HTML elements. It executes on plain JavaScript
along with html pages.

www.codingtag.com
Q. What do you mean by the
controller in AngularJS?
A. The controller is a function generally takes an empty scope
object as parameters and acts it to the fields and functions that
will be later exposed to the user through the view.

www.codingtag.com
Q. What is the role of AOT
compilation in AngularJS?
A. Applications made up of AngularJS consist of HTML
templates and some another component that cannot be
directly understood by the browser. For that, a
compilation process is required and in an Angular
Application, Ahead-of-Time compiler is used to compile
application during building time.

www.codingtag.com
Q. An Angular JS is open-source
software?
A. Yes

www.codingtag.com
Q. Which property is used to set
the text shadow around a text?
A. text-shadow

www.codingtag.com
Q. What are the roles of Directive
in AngularJS?
A. They are used to extend the functionality of the HTML by
integrating Attributes with ng-prefix. They are the markers
on the Data object Model and you can use it with any of
the controls or HTML tags which will tell the compiler what
specified behavior that DOM is expecting. AngularJS comes
with many inbuilt directives. The developer can also
manually create it as per their application requirement.

www.codingtag.com
Q. Who Developed AngularJS?

A. Adam Abrons and Misko Hevery had started working on


GetAngular project in 2009. Due to some reason, Adam
Abrons stopped working but Misko Hevery with his
manager update the existing project and named it as
AngularJS in 2010

www.codingtag.com
Q. Which Directive is used to
initialize Angular Application?
A. ng-app

www.codingtag.com
Q. Suppose if we want to validate
the email address or phone
number in AngularJS. How we can
do it?
A. Through Angular form validation and ng-pattern
directive

www.codingtag.com
Q. Which module in AngularJS is
helpful in Application to become
Single Page Application?

A. ngRoute module

www.codingtag.com
Q. If you want to create Different
URLs for Different Content in our
Application. Which concept can be
used in AngularJS?
A. AngularJS routes

www.codingtag.com
Q. Explain Routing in AngularJS?
A. Routing is the switching views concept. This concept
plays a major role in building single page application with
multiple views. AngularJS routing permits the developer to
create different URLs for different content on their
application and also helpful on the logical division of the
application and its binding through different controllers in
order to make it more manageable.

www.codingtag.com
Q. Give some disadvantage of
AngularJS?
A. a) Not Degradable
b) Not much secure
c) Lagging User Interface
d) Confusion of choosing better method as AngularJS
permits different methods to do the same task.

www.codingtag.com
Q. Give some Applications of
AngularJS?
A. a) Weather Applications
b) User Reviews Applications
c) Mobile Commerce
d) Travel Applications

www.codingtag.com
Q. What do you mean by SPAs
Application?
A. Single Page Applications are the web applications that load
a single page of HTML and dynamically update it as per user
interaction with the application and it never allows reloading
of the page.

www.codingtag.com
Q. What is the purpose of a "track
by" in AngularJS?
A. The "track by" is used with ng-repeat to boost the
rendering performance. Use of duplicate key in angular Js is
not permitted, for avoiding this "track by" along with ng-
repeat is used with angular expressions for the unique
identification. It also describes how the association between
model and DOM tracked by AngularJS.

www.codingtag.com
Q. Which function is used to add
run blocks on the module in
AngularJS?
A. run()

www.codingtag.com
Q. How can we format a date in
AngularJS?

A. We can do this through Date filter

{{ today | date:'MM/dd/yyyy’ }}

www.codingtag.com
Q. Suppose we want to want to
disable right click event in
AngularJS. Which function can be
used?
A. We required to integrate the disable-right-click as the
element's attribute and after that preventDefault() function
to cancel the event.

www.codingtag.com
Q. Is it possible to do animation in
AngularJS?
A. Yes, we can do animation in AngularJS for that there
firstly required to include AngularJS Animate library and
then ngAnimate module integration.

www.codingtag.com
Q. Name some browsers that
support AngularJS?
A. a) Mozilla firebox
b) Google Chrome
c) Internet Explorer 10,11
d) Android

www.codingtag.com
Q. Suppose we want to Share Data
between controllers in AngularJS,
how we can share it?
A. There are many methods that are used to share the data
between controllers. Some of the important ones are given
below:
a) $rootscope d) events
b) $broadcast e) $state.go
c) $emit method f) $stateparam
www.codingtag.com

You might also like