angular.js의 내부

· 10년 전 · 1085

[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,659
10년 전 조회 1,026
10년 전 조회 1,229
10년 전 조회 1,216
10년 전 조회 1,698
10년 전 조회 1,825
10년 전 조회 1,068
10년 전 조회 1,800
10년 전 조회 1,699
10년 전 조회 2,523
10년 전 조회 1,141
10년 전 조회 1,565
10년 전 조회 2,439
10년 전 조회 1,556
10년 전 조회 1,086
10년 전 조회 1,370
10년 전 조회 1,309
10년 전 조회 1,687
10년 전 조회 1,745
10년 전 조회 2,441
10년 전 조회 1,255
10년 전 조회 1,487
10년 전 조회 1,526
10년 전 조회 1,965
10년 전 조회 2,533
10년 전 조회 1,890
10년 전 조회 1,821
10년 전 조회 1,802
10년 전 조회 1,322
10년 전 조회 1,839