1. https://www.angular.cn/guide/lifecycle-hooks
    1. export class AppComponent {
    2. title = 'my-app';
    3. lists:Array<number> = [1,2,3];
    4. handleClick():void{
    5. console.log(this.title)
    6. this.title = "change"
    7. }
    8. // 组件初始化的时候触发 发送http请求
    9. ngOnInit(){
    10. console.log("init")
    11. }
    12. }