2016-04-20 10 views

答えて

2

なぜ角の$timeout

$timeout(function raiseEvent(){ 
    //do something here 
}, 30000) 
1

コードだ?に建てを使用しませんか..

角度コードのない例ですが、$ timeoutを自由に使用してapp.runの中にドロップしてください。

// This event starts watching when document loads 
// Any special event can work to trigger this instead 

$(document).ready(function(){ 
    var countdown = 30000; 

    // 30 Second Event 
    function thirty_second_event() { 
     console.log("it's been " + (countdown/1000) + " seconds"); 
    } 
    // Start the timer 
    setTimeout(thirty_second_event, countdown); 
}); 
関連する問題