Giter Site home page Giter Site logo

Comments (10)

davidmh avatar davidmh commented on June 25, 2024

Can you elaborate?

from allmighty-autocomplete.

 avatar commented on June 25, 2024

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.

davidmh avatar davidmh commented on June 25, 2024

That functionality it's not implemented yet, but it could be easily incorporated.

You could add a callback around here.

from allmighty-autocomplete.

 avatar commented on June 25, 2024

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.

 avatar commented on June 25, 2024

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.

davidmh avatar davidmh commented on June 25, 2024

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.

davidmh avatar davidmh commented on June 25, 2024

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.

 avatar commented on June 25, 2024

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.

davidmh avatar davidmh commented on June 25, 2024

Cool, you should send a pull request, it would be really useful to have that functionality.

from allmighty-autocomplete.

 avatar commented on June 25, 2024

Pull request issued — cheers!

from allmighty-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.