angularjs delay걸기 - $timeout 사용

북마크 추가

 

 

스크립트에서 딜레이를 걸어야 할 경우

 

 

 

 

 

$timeout(function , delay) 형식으로 사용

 

function ctrl( $timeout ){     //컨트롤러

 

$scope.aaa = function(){

 

$timeout(

function(){                                                   // function        100ms 후 실행

...

...

...

}

,100);        // 딜레이 ms

 

};

 

}

 

 

 

 

 

 

 

AD
관리자
2014-08-11 07:52
SHARE