angular.js의 내부

· 10년 전 · 1049

[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,598
10년 전 조회 981
10년 전 조회 1,196
10년 전 조회 1,171
10년 전 조회 1,665
10년 전 조회 1,792
10년 전 조회 1,039
10년 전 조회 1,769
10년 전 조회 1,660
10년 전 조회 2,484
10년 전 조회 1,109
10년 전 조회 1,526
10년 전 조회 2,403
10년 전 조회 1,525
10년 전 조회 1,050
10년 전 조회 1,335
10년 전 조회 1,264
10년 전 조회 1,645
10년 전 조회 1,702
10년 전 조회 2,401
10년 전 조회 1,218
10년 전 조회 1,447
10년 전 조회 1,483
10년 전 조회 1,921
10년 전 조회 2,499
10년 전 조회 1,845
10년 전 조회 1,768
10년 전 조회 1,760
10년 전 조회 1,286
10년 전 조회 1,803