1. The role of brackets1.1 Square brackets [ ]When the attribute name is enclosed in square brackets, the right side is assigned the value of the expression <br /> If the attribute does not have square brackets, the right side is assigned a string <div class="red">red</div> //The class name here is red <div [class]="red">red</div> //The class name here is blue, which means that the right side of the square brackets is an expression //In the component red: string = "blue"; 1.2 Parentheses ( )Parentheses are used for event binding, which triggers an event on an element and the bound method responds, such as <div (click)="go()">gogo</div> //Put the event in the parentheses //Component class go() { //expression... } 1.3 Curly Braces { { }}Use curly braces { {expression}} This method is called interpolation and can be placed in the template <div>{{good}}</div> //<div>Hello</div> //Component class good: string = "Hello"; 1.4 String variables |
<<: Briefly describe the difference between MySQL and Oracle
>>: How to modify the location of data files in CentOS6.7 mysql5.6.33
1. What is In react applications, event names are...
Table of contents 1. Instructions 2. Modifiers 3....
Table of contents Preface 1. Download MySQL 8.0.2...
MySQL 5.7 adds many new features, such as: Online...
1. Add the isolation marker: ip netns add fd 2. P...
Recently, when I was working on my "Football...
This article example shares the specific code of ...
MySQL handles GROUP BY and DISTINCT queries simil...
1. This is a bit complicated to understand, I hop...
Preface This is a new function I came across rece...
I have written such an article before, but I used...
MySQL 5.7 version: Method 1: Use the SET PASSWORD...
During this period of time, while working on a pr...
The specific code of the sliding button made with...
Linux task management - background running and te...