AngularJS Interview Questions Part - 1
Q 1. What is AngularJS?
Ans 1. AngularJS is a powerful Javascript framework. It is used to create
Single Page Application projects. It extends HTML DOM with additional
attributes and makes it more responsive to user actions. It is licenced under
the Apache license version 2.0. AngularJS is open source and completely free.
Q 2. What are the
advantages of using AngularJS?
Ans 2. Following
are the advantages of using AngularJS –
· Application
written in AngularJS is cross-browser compliant and it automatically handles
JavaScript code suitable for each browser.
· AngularJS
is a framework to build large scale and high performance web application while
keeping them as easy-to-maintain.
· Angular's
data binding and dependency injection eliminate much of the code you currently
have to write
Q 3. What is the latest
version of AngularJS framework?
Ans 3. The
latest version of AngularJS framework is 1.6.3
Q 4. What architectural
pattern is followed by AngularJS?
Ans 4. AngularJS
follows MVW architectural pattern i.e. Model View Whatever. It can act as MVC,
MVVM and MVP. For several years AngularJS was closer to MVC, but over time and
thanks to many refactoring and api improvements, it is now closer to MVVM – the
$scope object could be considered the ViewModel that is being decorated by a
function that we call a Controller. It is up to us to use AngularJS through any
pattern that best suits our requirements.
Q 5. What are the various
features of AngularJS?
Ans 5. Following
are the various Core features of AngularJS –
· Data-binding
· Scope
· Controller
·
Services
· Filters
· Directives
· Templates
· Routing
· Deep Linking
· Dependency Injection
Q 6. How to setup AngularJS
environment?
Ans 6. You can setup the environment for AngularJS through various options-
1. You can download the AngularJS library directly
from - https://angularjs.org/ 2. You can use the AngularJS library directly from a google CDN
3. You can get it from GitHub.
Include the AngularJS framework in your code as follows –
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
Q 7. What are the
disadvantages of AngularJS?
Ans 7. Though AngularJS has many advantages which make it an obvious choice for
web development, but it still has some disadvantages -
·
Not
Secure −
Being JavaScript only framework, application written in AngularJS are not safe.
Server side authentication and authorization is must to keep an application
secure.
·
Not degradable − If your application user disables
JavaScript then user will just see the basic page and nothing more.
Q 8. What is data binding
in AngularJS?
Ans 8. It
is the automatic synchronization of data between model and view components. It
is achieved through ng-model directive.
Q 9. What is Scope in
AngularJS?
Ans 9. It
is an object that refers to the model. It acts as a glue between controller and
view.
Q 10. What is Controller in
AngularJS?
Ans 10. Controller
is a JavaScript function that is bound to a particular scope.
Click here to watch more informative AngularJS Tutorial videos!
Click here to watch more informative AngularJS Tutorial videos!
Q 11. What is Controller in
AngularJS?
Ans 11. Controller
is a JavaScript function that is bound to a particular scope.
Q 12. What are services in
AngularJS?
Ans 12. AngularJS
comes with several built-in services for example $https: to make a
XMLHttpRequests. These are singleton objects which are instantiated only once
in app and can be used by different components.
Q 13. What are filters in
AngularJS?
Ans 13. These
select a subset of items from an array and return a new array. These also
format the data to be displayed.
Q 14. What are directives in
AngularJS?
Ans 14. Directives
are markers on DOM elements (such as elements, attributes, css, and more).
These can be used to create custom HTML tags that serve as new, custom widgets.
AngularJS has built-in directives (ng-bind, ng-model and many more).
Q 15. What are templates in
AngularJS?
Ans 15. These
are the rendered views with information from the controller and model. These
can be a single file (like index.html) or multiple views in one page using
"partials".
Q 16. What is routing in
AngularJS?
Ans 16. It
is the concept of switching views.
Q 17. What is deep linking in
AngularJS?
Ans 17. Deep
linking allows you to encode the state of application in the URL so that it can
be bookmarked. The application can then be restored from the URL to the same
state.
Q 18. What is dependency
injection in AngularJS?
Ans 18. AngularJS
has a built-in dependency injection subsystem that helps the developer by
making the application easier to develop, understand, and test.
Q 19. Explain AngularJS boot
process?
Ans 19. When
the page is loaded in the browser, following things happen:
·
HTML
document is loaded into the browser, and evaluated by the browser. AngularJS
JavaScript file is loaded; the angular global object
is created. Next, JavaScript which registers controller functions is executed.
·
Next
AngularJS scans through the HTML to look for AngularJS apps and views. Once
view is located, it connects that view to the corresponding controller
function.
·
Next,
AngularJS executes the controller functions. It then renders the views with
data from the model populated by the controller. The page gets ready.
hi Tech Geek,
ReplyDeleteThanks for your Great information,
please add more Angular (in-depth) interview questions and JavaScript and OOPs questions
Thank you Mahesh for your valuable feedback!!
DeleteI will definitely create more informative blogs soon.
Regards
I Visited lot of blogs and Web sites But in this AngularJS Blog Information is Very usefulthanks for sharing it........
ReplyDeleteThank you Kamalakar for you valuable feedback!!
DeleteRegards
Hey! Excellent post. I am impressed by your blogging skills. I have read many blogs earlier but haven’t read such a beautiful piece of work before.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
Nice blog! Thanks for sharing this valuable information
ReplyDeletePython Training in Bangalore
Python Classes in Pune
Python Training in Hyderabad
Python Classes in Gurgaon
Wonderful post and more informative!keep sharing Like this!
ReplyDeleteDOT NET Training in Bangalore
Dot Net classes in Pune
.Net Training in Hyderabad
Dot Net Training Institute in Delhi
Dot Net Training in Gurgaon