https://medium.com/geekculture/10-tricks-to-optimizing-the-performance-of-angular-app-d998d48ca634 를 해석한 글입니다. 10 Tricks to Optimizing the Performance of Angular app — Keep learning, keep building and keep growing :) medium.com 1. ChangeDetectionStrategy.OnPush Change detection은 JS와 관련 프레임워크에서 가장 기본적인 기능 중 하나이며 데이터가 변경되었을 때 DOM을 업데이트하여 변경사항을 반영하는 기능이다. 앵귤러는 Zone.js를 사용하여 각 비동기 이벤트를 monkey-patch하..
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..