Category: Databinding
-
Angular 7 Property Binding
In Angular 7, property binding is used to pass data from the component class (component.ts) and setting the value of the given element in the user-end (component.html). Property binding is an example of one-way databinding where the data is transferred from the component to the class. The main advantage of property binding is that it…
-
Angular 7 Event Binding
Angular facilitates us to bind the events along with the methods. This process is known as event binding. Event binding is used with parenthesis (). Let’s see it by an example: component.html file: It will give an output that “No Server is created”. Now, we are going to bind an event with button. Add another…
-
Angular 7 String Interpolation
In Angular, String interpolation is used to display dynamic data on HTML template (at user end). It facilitates you to make changes on component.ts file and fetch data from there to HTML template (component.html file). For example: component.ts file: Here, we have specified serverID and serverStatus with some values. Let’s use this in “component.html” file.…
-
Angular Databinding
Databinding is a powerful feature of Angular. Angular Databinding is used for communication. It is used to communicate between your TypeScript code (your business logic) and the other component which is shown to the users i.e. HTML layout. Databinding is necessary because when we write the code in TypeScript, it is compiled to JavaScript and…