COMING SOON 🚀

angular.js의 내부

· 10년 전 · 1091

[code]

(function(window, document, undefined) {

 

})(window, document); 

!window.angular.$$csp().noInlineStyle && 

window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); 

[/code]

 

2개의 문장인가요?

 

jquery는 한문장...

[code]

(function( window, undefined ) {

 

})( window );

[/code] 

 

둘다 익명 즉시 실행 함수이네요.. 내부 함수를 어떤식으로 부르는지??

 

[code]

(function(window, document, undefined) {

 

 

}(window, document)); 

[/code]

Javascript의 대가이신 더글라스 클락포트의 권장 표기법은 이와 같이 하라고.. 둘이 동작은 똑같겠죠 

 

|
댓글을 작성하시려면 로그인이 필요합니다.

앱개발

+
분류 제목 글쓴이 날짜 조회
10년 전 조회 1,671
10년 전 조회 1,034
10년 전 조회 1,237
10년 전 조회 1,225
10년 전 조회 1,706
10년 전 조회 1,828
10년 전 조회 1,075
10년 전 조회 1,806
10년 전 조회 1,707
10년 전 조회 2,528
10년 전 조회 1,144
10년 전 조회 1,570
10년 전 조회 2,450
10년 전 조회 1,565
10년 전 조회 1,092
10년 전 조회 1,379
10년 전 조회 1,311
10년 전 조회 1,693
10년 전 조회 1,753
10년 전 조회 2,449
10년 전 조회 1,261
10년 전 조회 1,497
10년 전 조회 1,530
10년 전 조회 1,970
10년 전 조회 2,543
10년 전 조회 1,892
10년 전 조회 1,826
10년 전 조회 1,804
10년 전 조회 1,326
10년 전 조회 1,844