1 What is data binding?
In Angular, data binding is one of the most powerful and important features that allow you to define the communication between the component and DOM(Document Object Model). It basically simplifies the process of defining interactive applications without having to worry about pushing and pulling data between your view or template and component. In Angular, there are four forms of data binding:
35) What are the common Angular Global API functions
Some commonly used Angular Global API functions are:
What is Angular mainly used for?
Angular is typically used for the development of SPA which stands for Single Page Applications. Angular provides a set of ready-to-use modules that simplify the development of single page applications. Not only this, with features like built-in data streaming, type safety, and a modular CLI, Angular is regarded as a full-fledged web framework.
Q. What is jQLite/jQuery Lite?
jQLite is a subset of jQuery that is built directly into AngularJS. jQLite provides you all the useful features of jQuery. In fact it provides you limited features or functions of jQuery.
66) Lit out hooks are available in AngularJS
Various hooks in AngularJS are:
2 What is a provider in Angular?
A provider is a configurable service in Angular. It is an instruction to the Dependency Injection system that provides information about the way to obtain a value for a dependency. It is an object that has a $get() method which is called to create a new instance of a service. A Provider can also contain additional methods and uses $provide in order to register new providers.
69) Explain parameterized pipe in AngularJS
In angularJS, pipes can have more than one parameter in order to tune the fine output. You can create a parameterized pipe by declaring the pipe with colon(:) and values of parameter. Developer can separate multiple parameter values with colon(:).
Routing is a method of merging various views. The controller takes the decision to combine these views depend on logical needs.
Question: What are the DOM and BOM in Angular JS?
The DOM is the Document Object Model. Itβs the view part of the UI. Whatever we change in page elements is reflected in the DOM.
BOM is the Browser Object Model, which specifies the global browser objects like window, local storage, and console.
61) Explain the differences between Angular and jQuery
AngularJS | JQuery |
AngularJs is difficult to understand | Jquery is very easy to understand. |
It supports two-way binding process | It does not support data binding process |
It provides support for deep linking routing | It does not provide support for deep linking routing |
Q. How do you share data between controllers?
Create an AngularJS service that will hold the data and inject it inside of the controllers.
Using a service is the cleanest, fastest and easiest way to test. However, there are couple of other ways to implement data sharing between controllers, like: β Using events β Using $parent, nextSibling, controllerAs, etc. to directly access the controllers β Using the $rootScope to add the data on (not a good practice) The methods above are all correct, but are not the most efficient and easy to test. There is a good video explanation on egghead.io.