Comments (10)
Can you elaborate?
from allmighty-autocomplete.
Yes, thank you! I want to use $http to fetch a list of results based on a few form fields.
For simplicity, let's say we want to search for friends:
Home town _____________ (uses allmighty-autocomplete)
First name _________
Gender M/F
I want this form to update results when anything is changed -- but not with every on-type event in the hometown field -- only when a real city is selected from the list of autocomplete suggestions.
Any way to do this?
from allmighty-autocomplete.
That functionality it's not implemented yet, but it could be easily incorporated.
You could add a callback around here.
from allmighty-autocomplete.
Thanks so much for the response — I’ll see what I can do. Meanwhile perhaps you can consider this an official “feature request” :-)
Thanks!
On May 13, 2014, at 4:47 PM, Chuck [email protected] wrote:
That functionality it's not implemented yet, but it could be easily incorporated.
You could add a callback around here.
—
Reply to this email directly or view it on GitHub.
from allmighty-autocomplete.
Would you be so kind as to point me a bit further in the right direction? I tried calling my controller method directly from the point in the code where you showed me -- bit the method can't be found. I suspect it's out of scope but not sure how to address it properly. I'm simply trying to run a method named "updateProviders()" which is in my formCtrl controller. Any tips for an NG newbie? Thanks :-)
from allmighty-autocomplete.
You're right, the function it's out of the scope, you need to make a connection between your app's scope and this directive.
You can add a new attribute to specify the function to be referenced, and the invoking it where you need it.
You can see that exact example with the on-type parameter in the directive attributes.
Declaration for the scope and invokation
from allmighty-autocomplete.
Hey @df-sean, what did you end up using?
If you haven't done it yet, I could give it a shot.
from allmighty-autocomplete.
Thank you so much for following up. A few hours ago, I followed your example and managed to get it going. Thanks again!
from allmighty-autocomplete.
Cool, you should send a pull request, it would be really useful to have that functionality.
from allmighty-autocomplete.
Pull request issued — cheers!
from allmighty-autocomplete.
Related Issues (20)
- Not losing focus
- Support ng-disabled
- Pass id into on-type
- work like gmail or another email client
- Is it possible to show all list on initial focus or when suggestion is null?
- ng-enter search
- Closes the scrollable list of items if you click on scroll button HOT 2
- Read-Only & Disabled?
- suggestion problem
- Doesn't with array of objects HOT 1
- Add input-type=search (configureable)
- Disable spellcheck on mobile devices
- want to clear value in input type HOT 1
- How i can get the value ?
- tabindex not working
- Can multiple select?
- How I use ng-change?
- what modification required for using within ng-repeat
- getting console error on typing in autocomplete text box HOT 1
- any body implemented Add new item when no result found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allmighty-autocomplete.