Communication Between Components Using @Input() in Angular

In Angular 2 a component can share data and information with another component by passing data or events. A component can be used inside another component, thus creating a component hierarchy. The component being used inside another component is known as the child component and the enclosing component is known as the parent component. Components…… Continue reading Communication Between Components Using @Input() in Angular

Simplifying Two-Way Data Binding in Angular

There are three types of data bindings in Angular , they are as follows: Interpolation Event Binding Property Binding If you are coming from Angular 1.X background, you might be wondering that where is the two-way data binding? Remember, when first time you saw AngularJS 1.X demo, and was just blown away by power of…… Continue reading Simplifying Two-Way Data Binding in Angular

How to create constants in JavaScript?

Constants are immutable variables which value cannot be changed. Once, you have created a constant, its value cannot be changed. While coding in JavaScript, many times you may have come across a requirement to create constants. Before ECMA Script 6, it was not very easy to create constants in JavaScript. In this post, I will…… Continue reading How to create constants in JavaScript?

How to print or enumerate properties of a JavaScript object?

I usually come across the following requirements, How to print name of all the properties of an object? How to print only the methods of an object? How to print even non-enumerable properties of an object? In this post, we will explore all the options to iterate and print properties of a JavaScript object. Let…… Continue reading How to print or enumerate properties of a JavaScript object?

Introduction to Angular Components

A component is a main building block of an AngularĀ  application, and an application may have any number of components. We can consider a component a particular view of the application with its own logic and data. In AngularJS 1.0, there was the concept of controllers, $Scope, and directives to bind data and logic to…… Continue reading Introduction to Angular Components