Enterprise APP
Angular 프로젝트 production 반영시 고려사항 본문
* Directive의 특성상 재귀호출이 이루어지는 scope 설정을 isolated scope로 사용해야 할 필요성이 있는지 확인
* scope 데이터와 DOM 상호 Two-way binding이 필요한가? -> 1.5.5 부터 지원되는 `<` one-way 바인딩 지시자로 대치
* Disabling Debug Data : 컴파일시 각 엘리먼트별 debuggin용 ng-scope를 생성하는데 production에서는 필요없으니(stage에서는 on) 기능을 off 시킬 것(default는 true)
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
* html, css에 포함된 주석은 컴파일에서 제외
* Running an AngularJS App in Production$compileProvider.commentDirectivesEnabled(false);
$compileProvider.cssClassDirectivesEnabled(false);
'Angular 1.X' 카테고리의 다른 글
$applyAscync - 동시 다발적인 $digest의 효율적인 처리 (0) | 2017.03.06 |
---|
Comments