Tag: Javascript
-
How to Create Basic Inheritance in JavaScript Constructors
There are four ways to create an object in JavaScript. They are as follows: Object as literal Constructor Invocation Pattern Object.create() method Using class after ES6 Implementation of Inheritance varies according to the object creation method. In this post, I am going to explain creating inheritance in between a function constructor. Let’s say you have…
-
How to seal, freeze and prevent extension of an object in JavaScript
Read full article on the Infragistics blog In modern JavaScript, objects are integral, and having a strong understanding of topics surrounding objects is necessary for writing better JavaScript. You can create an object in four ways in JavaScript. Read about them in greater detail here. Once you know how to create an object, you may…
-
Angular Components: Pass by Reference or Pass by Value?
Read full article on the Infragistics blog In Angular, you can pass data from parent component to child component using @Input() decorator, and a child component can emit an event to a parent comment using @Output() decorator. The purpose of this blog post is to explain you whether it is pass by reference or pass…
-
Module Pattern in JavaScript
In JavaScript, code encapsulation can be achieved using Modules Patterns. In addition, it is used to create private and public properties. There are various ways a module pattern can be implemented. In this article, we will learn to create a module pattern in ES5. Before we go ahead and start looking into implementation of the…
-
Hosted 11th free Angular session
On 13 January 2018, geek97 hosted 11th free session on Angular in Gurgaon. You can find detail of meetup here Around 35 senior Angular Developers attended the meetup and Dhananjay Kumar delivered the sessions. There were two sessions: Component Communications @Input @Output EventEmitter Temp Ref variable Reactive Forms FormControl FormGroup Validation Custom Validation You can…
-
Simplifying function expressions and the function statement in JavaScript
Read full article on the Infragistics blog In JavaScript, a function can be created in three possible ways: Function as an expression Function as a statement Arrow functions In this post, we will learn about function expressions and the function statement. Consider the following code: This file contains bidirectional Unicode text that may be interpreted…
-
What are the Call and Apply Methods in JavaScript
Read full article on the Infragistics blog In JavaScript, the apply() and call() methods execute a function in the context (scope) of the first argument you pass to them. Let’s take a look at them in action to learn more. Say that you have an object person as shown below: This file contains bidirectional Unicode text that…
-
Four Ways to Create Objects in JavaScript
In JavaScript, there are four methods to use to create an object: Object literals New operator or constructor Object.create method Class In this post, we will learn each of these methods. Object literals An object literal, also called an object initializer, is a comma-separated set of paired names and values. You can create an object…
-
What are Template Literals in JavaScript
Read full article on the Infragistics blog In ES6, two types of literals were introduced: Template Literals for string concatenation and expression embedding in a string Tagged Template Literals to tag the Template Literal in a function so the literal can be evaluated in the function Let’s assume that you need to do the string…
-
How to Create Your First Angular Reactive Form
Read full article on the Infragistics blog Out of the box, Angular provides us with two types of forms: Template Driven Forms Reactive Forms In Template Driven Forms, you create controls on the component template and bind data using ngModel. With these, you do not create controls, form objects, or write code to work with…