Angular自学笔记(?)ViewChild和ViewChildren

路欣荣
2023-12-01

ViewChild

最好在ngAfterViewInit之后,获取模版上的内容

获取普通dom

import {
   AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';

@Component({
   
  selector: 'app-view-child'
 类似资料: