import { Component, TemplateRef, ViewContainerRef, ViewChild, AfterViewInit } from '@angular/core'; @Component({ selector: 'app-code404', template: ` <!-- 這里使用一個模板變量,在組件中使用@ViewChild裝飾器獲取模板元素--> <ng-template #tpl> Big Keriy ! </ng-template> `, }) export cl...
www.dbjr.com.cn/article/1167...htm 2025-5-30