Top 100 Frequently asked AngularJS Interview Questions & Answers..!

1.What is AngularJS?
AngularJS is open source client side MV* (Model – View – Whatever) framework for creating dynamic web applications. It gives life to your static HTML and makes it dynamic with its magic. It extends HTML using directives, expression and data binding techniques to define a powerful HTML template.
2. What are the uses of AngularJS?
Below are the uses of AngularJS –
It uses MVC pattern.
Allows to create our own directive for making components reusable.
Used for two way binding i.e, connecting model and view.
Supports Dependency Injection (DI)
3. Explain what are the key features of Angular.js ?
The key features of angular.js are:
=> Scope
=> Controller
=> Model
=> View
=> Services
=> Data Binding
=> Directives
=> Filters
=> Testable
4. List out the advantages of AngularJS?
Below is the list of advantages of AngularJS –
Code Reusability
Data Binding
Customize and Extensible
5. What makes angular.js better?
Registering Callbacks: There is no need to register callbacks. This makes your code simple and easy to debug.
Control HTML DOM programmatically: All the application that is created using Angular never have to manipulate the DOM although it can be done if it is required.
Transfer data to and from the UI: Angular.js helps to eliminate almost all of the boilerplate like validating the form, displaying validation errors, returning to an internal model and so on which occurs due to flow of marshaling data.
No initilization code: With angular.js you can bootstrap your app easily using services, which auto-injected into your application in Guice like dependency injection style.
6. Is AngularJS extensible?
Yes! In AngularJS we can create a custom directive to extend AngularJS existing functionalities.
Custom directives are used in AngularJS to extend the functionality of HTML. Custom directives are defined using “directive” function. A custom directive simply replaces the element for which it is activated. AngularJS application during bootstrap finds the matching elements and do one-time activity using its compile() method of the custom directive then process the element using link() method of the custom directive based on the scope of the directive.

7. Mention what are the advantages of using Angular.js framework?
Advantages of using Angular.js as framework are:
=>Supports two-way data-binding
=>Supports MVC pattern
=>Support static template and angular template
=>Can add the custom directive
=>Supports REST full services
=>Supports form validations
=>Support both client and server communication
=>Support dependency injection
=>Applying Animations
=>Event Handlers
8. How AngularJS is used to handle the security hurdles?
Below is the list of security hurdles handled by AngularJS –
  • Used for preventing CSS attacks
  • Used for preventing XSRF protection
  • Used for preventing HTML injection
9. Who created Angular JS ?
Initially, it was developed by Misko Hevery and Adam Abrons. Currently, it is being developed by Google.
10. Is AngularJS a framework, library or a plugin?
The suitable answer is that its a framework. As its lightweight, so people also get confused between library and framework. AngularJS is open source client-side MVC framework for creating dynamic web applications.

No comments: