본문 바로가기 메뉴 바로가기

gguldiary

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

gguldiary

검색하기 폼
  • ggul Diary (43)
    • 프로그래밍 (43)
      • JAVA (7)
      • Javascript (1)
      • Angular (12)
      • git (9)
      • Spring (6)
      • 용어정리 (6)
      • 데이터통신과 네트워크 (2)
      • Node.js 디자인 패턴 바이블 (0)
      • 면접준비 (0)
  • 방명록

ElementRef (1)
ViewContainerRef를 사용한 Angular DOM manipulation

ElementRef, TemplateRef, ViewRef, ComponentRef and ViewContainerRef을 통해 dom을 조작하는 방법에 대해 알아보자 @ViewChild component/directive class 안에서 추상화에 접근하기 위해선 Angular에서 제공하는 @ViewChild, @ViewChildren이라는 DOM쿼리라는 매커니즘을 사용한다. @ViewChild는 하나, @ViewChildren은 여러개의 쿼리를 반환한다. // 기본 사용 형태 @ViewChild([reference from template], {read: [reference type]}); // example @Component({ selector: 'sample', template: ` I am s..

프로그래밍/Angular 2021. 6. 19. 13:19
이전 1 다음
이전 다음
최근에 올라온 글
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Blog is powered by Tistory / Designed by Tistory

티스토리툴바