What is the Purpose of Event Binding in Angular 8?

Event binding is a technique in Angular 8 used to handle the events raised from the DOM like button click, mouse move etc. When the DOM event happens (eg. click, change, keyup, keydown), it calls the specified method in the component. See an example of event binding. In this example, the playMusic() method from the … Read more

What is String Interpolation in Angular 8, and why is it used?

String Interpolation is a one-way data-binding technique in Angular 8. It is used to extract the output data from a TypeScript code to the HTML template view layer. It shows the data from the component to view layer in the form of curly braces. This interpolation technique adds the value of property to the component. … Read more

What is data binding in Angular 8?

Data Binding is one of the key concepts of Angular 8. It is the most eminent technique which is used to link your data to the view layer. It is used to make a communication between the DOM and the TypeScript code of your component. In simple words, you can say that data binding is … Read more

What is the usage of Angular 8 ngIf Directive?

The Angular 8 ngIf directive is a structural directive that is used to add or remove HTML elements according to the expression. The expression must return a Boolean value true or false. You can see the functioning of nglf directive clearly. If the expression is false, then the element is removed. Otherwise, the element is … Read more

What is the usage of Angular 8 ngFor Directive?

The Angular 8 ngFor directive is used to repeat a portion of the HTML template once per each item from an iterable list (Collection). The ngFor is an Angular structural directive and is similar to ngRepeat in AngularJS. Some local variables like Index, First, Last, odd, and even are exported by ngFor directive. In Angular … Read more