shahata / angular-debounce Goto Github PK
View Code? Open in Web Editor NEWAngularJS service and directive for debounce
License: MIT License
AngularJS service and directive for debounce
License: MIT License
This is my code
<input ng-model="chunk.userInput" debounce="500">
and I get the following error:
Controller 'ngModel', required by directive 'debounce', can't be found!
Apart from the debounce directive my input field works just fine. My model is properly updated. But it just doesn't debounce!
I'm running angular v. 1.2.25
Unfortunately the debounce
directive doesn't seem to work with input
s of type="number"
. Triggers right away. Tested in both Firefox and Chrome. Changing the input to type="text"
does use the delay.
Hey, this debounce project is great!
Do you think you can make it work with Angular 1.1.5? Currently, it breaks on this line:
var commitSoon = debounce(function (viewValue) {
with this error:
TypeError: object is not a function
Thanks!
When using debounce="500"
on an input element, my custom validate directive is fired twice for a single keypress.
In this codepen you can see that entering a single letter in the first input results in a double call to validation. Entering a char in the bottom input (without debounce), behaves normally and triggers only once: http://codepen.io/omichelsen/pen/uFoEb
The debounce is broken for version 1.3.0, check the fiddle below:
http://jsfiddle.net/9sqtvcou/1/
If you change the "external resources" to the version 1.2.27 it works.
readme says just 'debounce'
Changing param "immediate" to triggerOnEgde[leading, trailing, both] would be perfect for situations like pagination. A user would not wait if he clicks just once. And if he clicks multiple times all clicks between the first and the last are not counted but he'd get the data for the last click.
Since this is a released package via bower you should be using the dependency injection that allows this to be minified or ship with a minified version.
I can PR it in if you like.
It seems that users can't install angular-debounce with npm:
Unfortunately, angular-debounce
name is already taken by https://www.npmjs.com/package/angular-debounce and ng-debounce
also taken by https://www.npmjs.com/package/ng-debounce
Could you please publish this great package to npmjs? :) shahata-angular-debounce
could be a nice name.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.