angular.js의 내부

· 10년 전 · 1137

[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,162
10년 전 조회 1,887
10년 전 조회 1,144
10년 전 조회 1,300
10년 전 조회 1,215
10년 전 조회 2,056
10년 전 조회 1,663
10년 전 조회 1,860
10년 전 조회 1,324
10년 전 조회 1,516
10년 전 조회 1,790
10년 전 조회 2,013
10년 전 조회 1,301
10년 전 조회 1,391
10년 전 조회 1,138
10년 전 조회 1,377
10년 전 조회 1,360
10년 전 조회 1,501
10년 전 조회 1,110
10년 전 조회 1,289
10년 전 조회 1,762
10년 전 조회 1,520
10년 전 조회 2,069
10년 전 조회 1,696
10년 전 조회 1,364
10년 전 조회 1,356
10년 전 조회 1,161
10년 전 조회 1,134
10년 전 조회 3,351
10년 전 조회 1,240
🐛 버그신고