Code Monkey home page Code Monkey logo

Comments (4)

offsky avatar offsky commented on September 23, 2024

I am not sure that I understand this request. Do you have multiple fields with the same id? Is that why you need the extra parameter? It would probably be a more general purpose solution if we just broadcast the entire options object so you could stuff it with whatever you want and get it back in the end.

from ade.

lanceschi avatar lanceschi commented on September 23, 2024

The data I show through an ngRepeater come from a MySQL database table and I keep them updated via $http hooking into the "ADE-finish" broadcast message.

For every row there is of course an unique id albeit different fields and fieldnames. Instead of embedding fieldname in the id attribute of options object in ade-text directive I added the field (or if you prefer fieldname) attribute. I modify the done function accordingly.

I hope I made my point clearer. ;)

Thanks for your attention.

Cheers,
Luca

from ade.

offsky avatar offsky commented on September 23, 2024

It just occurred to me what you can do. The "id" option does not need to be a string. You can passthrough anything that you want in here, including an object. So, what you can do is pass {"id":"1234","field":"company"} into the id option and it will come to you as an object when you get the broadcast so you can get each field without string parsing.

Here is the directive that you would use: ade-text='{"className":"input-large","id":{"id":"1234","field":"abcd"}}'

from ade.

lanceschi avatar lanceschi commented on September 23, 2024

Good point. I concur. Thanks!

from ade.

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.