use:
1. cmd built into the project directory to perform ng new website (website for the project name)
2, into a construction project directory, execute ng serve to start the project
3, browser and enter http: // localhost: 4200 you can enter the project page
Use Code:
1 outputs the data to the page
export class AppComponent { username = "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" // 输出 字符串 login (): void {// method call alert("iiiiiiiiiiiiiiiiiiiiiiiiiiiii") } }
<button (click)="login()">{{username}}</button>