Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Why is the return function in my debounce function never called? Angularjs

public debounceTimer;

public debounce = (func, delay, event) => {
  console.log(func, delay, event.target.value);
  clearTimeout(this.debounceTimer);
  console.log(func, delay, event.target.value);
  this.debounceTimer = setTimeout(() => func.apply(this, [event.target.value]), delay);

};

public resolveInput(event) {
  console.log('resolved', event);
}
 
PREVIOUS NEXT
Tagged: #Why #return #function #debounce #function #Angularjs
ADD COMMENT
Topic
Name
6+9 =