舉例來說,當我們建立一個叫做test 的Component,就會去呼叫constructor 和ngOnInit 來初始化元件:. import { Component, OnInit } from '@angular/core'; ...
確定! 回上一頁