Code Monkey home page Code Monkey logo

Comments (12)

danhunsaker avatar danhunsaker commented on August 20, 2024

The track by approach is more correct as the ngRepeat goes, but I'll try to get in and add logic to strip anything with a key name starting with $. Or if you have a moment to adjust your tweak to check that instead of just the one key, I'd accept the PR. :-)

Thanks for the heads up. I suspect lots of use cases where Angular will pollute the template before ngDynForms actually sees it, so I'll need to be ready.

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

Try it now; this should be fixed.

from angular-dynamic-forms.

JK00 avatar JK00 commented on August 20, 2024

Thanks.
One other thing, I think on line 444, you need a if(ctrl), because your ngModel has a '?' before it.
It's been giving me some errors.

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

Hrm. ctrl is the controller responsible for that element - it has nothing to do with the ng-model attribute. Not sure of a situation where you could have an undefined ctrl there...

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

OK, I take that back. It's the controller for the ng-model itself. Let me research this further...

from angular-dynamic-forms.

JK00 avatar JK00 commented on August 20, 2024

Maybe I'm wrong. I'm getting this on a screen that doesn't use dynamic-forms:

TypeError: Cannot set property '$render' of undefined
at link (http://localhost:8090/app/shared/vendor/angular-dynamic-forms/dynamic-forms.js:444:24)

If I add 'if (ctrl)' on line 444, it seems ok, but that's probably a terrible hack on my part. I just needed to hack something up to demo.

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

You're right; it should be ignoring file and range input elements that don't have ng-model on them. Not sure what use cases would benefit from not being connected to a model (traditional file uploads, I imagine, though the expansions to file handling make that easier to handle in less traditional ways - I should document those in the README sometime...), but I've pushed the fix anyway, because it is still a bug.

from angular-dynamic-forms.

JK00 avatar JK00 commented on August 20, 2024

One more question:
if (String.charAt(id, 0) == '$') {
this line is generating this error:

TypeError: undefined is not a function
at buildFields (http://localhost:8090/app/shared/vendor/angular-dynamic-forms/dynamic-forms.js:92:26)

Am I doing something wrong?

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

No. I just got lazy and took advantage of a language construct that doesn't exist in every browser. I'll adjust the line so it will actually work and repush in a bit. Sorry about that.

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

That should fix it. Sorry about that.

from angular-dynamic-forms.

JK00 avatar JK00 commented on August 20, 2024

Cool. Thanks!

from angular-dynamic-forms.

danhunsaker avatar danhunsaker commented on August 20, 2024

If that's everything, I'll close this. 😄

from angular-dynamic-forms.

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.