What is AngularJS and what are some of its advantages?
This question might seem basic at first glance, but what you’re really doing is giving the developer a chance to show you what they know about your chosen framework. AngularJS is a powerful JavaScript-based development framework designed to create dynamic single-page applications with fewer lines of code. Some of the key advantages that you’ll want to look for in their response are listed below.
Data binding is as easy as writing in your code.
AngularJS was made for CRUD applications, which happen to represent the majority of web apps (excluding DOM manipulation-intensive applications like games and GUI editors).
It separates DOM manipulation from app logic, making code modular and easy to test.
It’s a comprehensive client-side solution in that it decouples the client-side from server-side development effort.
What is the Model View Controller (MVC)?
MVC is a common design pattern used in developing software that consists of three parts: the model, view, and controller. The model is the lowest level of the pattern and is responsible for maintaining data. The view is the part of the application that is presented to the user. The controller is the code that governs all interactions between the model and the view.
Are you Looking for Angular JS Online Training? Please Enroll for Demo Angular JS..! |
What is data binding in AngularJS? How does it relate to the MVC architecture?
In most tinplating systems, data binding is unidirectional. When the model and template components are merged together, it creates a view. However, the developer must write code to constantly synchronize the model and the view. AngularJS uses two-way data binding, where any changes to the view will automatically update the model and vice versa. The view is more or less just a projection of the model, which greatly simplifies things from the programmer’s perspective.
Explain the concept of scope. How does scope inheritance work in AngularJS?
Scope is an object that represents the data-model of an AngularJS application—it is the glue between the view and the application controller. Scope inheritance closely mimics the DOM structure of the application. With the exception of isolated scopes created using custom directives, scopes follow prototypal inheritance. The code block below demonstrates typical scope inheritance.
Explain why there are two “destroy” events associated with the termination of a scope in AngularJS.
The first $destroy is an AngularJS event associated with components like controllers or link functions. The second is actually a jqLite/jQuery event associated with the removal of a node, which may occur without a scope teardown.
What is dependency injection and how does it work?
AngularJS was designed to highlight the power of dependency injection, a software design pattern that places an emphasis on giving components their dependencies instead of hard coding them within the component. For example, if you had a controller that needed to access a list of customers, you would store the actual list of customers in a service that can be injected into the controller instead of hardcoding the list of customers into the code of the controller itself. In AngularJS you can inject values, factories, services, providers, and constants.
Explain the role of $routeProvider in AngularJS.
The $routeProvider is used to configure roots within an AngularJS application. It can be used to link a url with a corresponding HTML page or template, and a controller (if applicable).
What are the advantages of AngularJS?
There are following advantages of AngularJS:
Data Binding – AngularJS provides a powerful data binding mechanism to bind data to HTML elements by using the scope.
Customize & Extensible – AngularJS is customized and extensible as per your requirement. You can create your own custom components like directives, services etc.
Code Reusability – AngularJS allows you to write code which can be reused. For example, a custom directive which you can reuse.
Support – AngularJS is a mature community to help you. It has wide support over the internet. Also, AngularJS is supported by Google which gives it an advantage.
Compatibility – AngularJS is based on JavaScript which makes it easier to integrate with any other JavaScript library and runnable on browsers like IE, Opera, FF, Safari, Chrome etc.
Testing – AngularJS is designed to be testable so that you can test your AngularJS app components as easy as possible. It has dependency injection at its core, which makes it easy to test.
How is AngularJS different from other JavaScript Framework?
Today, AngularJS is the most popular and dominant JavaScript framework for professional web development. It is well suited for small, large and any sized web app and web application.
AngularJS is different from other JavaScript framework in following ways:
AngularJS mark-up lives in the DOM.
AngularJS uses plain old JavaScript objects (POJO).
AngularJS is leveraged with Dependency Injection.
What IDEs can you use for AngularJS development?
AngularJS development can be done with the help of following IDEs:
Visual Studio 2012, 2013, 2015 or higher
Eclipse
WebStorm
Sublime Text
TextMate
Does AngularJS has dependency on jQuery?
AngularJS has no dependency on jQuery library. But it can be used with jQuery library.
What browsers does AngularJS support?
The latest version of AngularJS 1.3 support Safari, Chrome, Firefox, Opera 15+, IE9+ and mobile browsers (Android, Chrome Mobile, iOS Safari, Opera Mobile).
AngularJS 1.3 has dropped support for IE8 but AngularJS 1.2 will continue to support IE8.
What is the size of an angular.js file?
The size of the compressed and minified file is < 36KB.
Is AngularJS a library, framework, plugin or a browser extension?
AngularJS is a first class JavaScript framework which allows you to build well structured, easily testable, and maintainable front-end applications. It is not a library since library provides you limited functionality or has dependencies to other libraries.
It is not a plugin or browser extension since it is based on JavaScript and compatible with both desktop and mobile browsers.
Are you Looking for Angular JS Online Training? Please Enroll for Demo Angular JS..! |
What browsers AngularJS support?
The latest version of AngularJS 1.3 support Safari, Chrome, Firefox, Opera 15+, IE9+ and mobile browsers (Android, Chrome Mobile, iOS Safari, Opera Mobile).
AngularJS 1.3 has dropped support for IE8 but AngularJS 1.2 will continue to support IE8.
How AngularJS handle the security?
AngularJS provide following built-in protection from basic security holes:
Prevent HTML injection attacks.
Prevent Cross-Site-Scripting (CSS) attacks.
Prevent XSRF protection for server side communication.
Also, AngularJS is designed to be compatible with other security measures like Content Security Policy (CSP), HTTPS (SSL/TLS) and server-side authentication and authorization that greatly reduce the possible attacks.
What is core module in AngularJS?
This module is loaded by default when an angular app is started. This module provides the essential components for your angular app like directives, services/factories, filters, global APIs and testing components.
How angular modules load the dependencies?
An angular module use configuration and run blocks to inject dependencies (like providers, services and constants) which get applied to the angular app during the bootstrap process.