10 examples of 'angular 2 delay' in JavaScript

Every line of 'angular 2 delay' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
1330function delay(duration) {
1331 return this.animate('', duration, { '': 0 });
1332}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

40get delayL(): number {
41 return this.controllerValues.delayL
42}
511function setDelay(v) {
512 delay = parseInt(v);
513}
339var delay = function delay(time) {
340 return timing(new AnimatedValue(0), {
341 toValue: 0,
342 delay: time,
343 duration: 0
344 });
345};
290this.$fTimer = setInterval(function delay(){
291 try {
292 if (!_self.$fTimer || document.activeElement != _self.$ext) {
293 _self.$visualFocus(true);
294 clearInterval(_self.$fTimer);
295 }
296 else {
297 clearInterval(_self.$fTimer);
298 return;
299 }
300 }
301 catch(e) {}
302}, 1);
96function delay(duration) {
97 return new Promise( resolve => setTimeout( resolve, duration ) );
98}
20return function debounce(fn, wait) {
21 var timer;
22
23 var debounced = function() {
24 var context = this,
25 args = arguments;
26
27 debounced.$loading = true;
28
29 if (timer) {
30 $timeout.cancel(timer);
31 }
32
33 timer = $timeout(function() {
34 timer = null;
35 debounced.$loading = false;
36 fn.apply(context, args);
37 }, wait);
38 };
39
40 return debounced;
41};
646set delay(delay: number) {
647 this.animationOptions.delay = delay;
648}
42.constant('debounce', function debounce(callback, delay) {
43 let timeout;
44 return function() {
45 const context = this;
46 const args = arguments;
47 clearTimeout(timeout);
48 timeout = setTimeout(function() {
49 callback.apply(context, args);
50 }, delay);
51 };
52})
40delay(ms) {
41 return new Promise(function(fulfill, reject) {
42 setTimeout(function() {
43 fulfill();
44 }, ms);
45 });
46}

Related snippets