angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

dynamic element validation

Open hyusetiawan opened this issue 14 years ago • 235 comments

I have a problem with validating inputs that are generated dynamically. Here is the fiddle that shows the problem: http://jsfiddle.net/flsilva/8JzDb/17/

this is taken from: https://groups.google.com/forum/?fromgroups=#!topic/angular/qLeUWZVuQMI

the name is generated fine but it's not bound to the form scope. Because I can name it correctly but the form is not bound, it seems that this behavior is inconsistent.

Thoughts?

hyusetiawan avatar Sep 21 '12 22:09 hyusetiawan

+1

pilhuhn avatar Nov 03 '13 17:11 pilhuhn

+1

bcronje avatar Nov 06 '13 11:11 bcronje

+1

pruchnil avatar Nov 07 '13 17:11 pruchnil

+1

j-pdx avatar Nov 14 '13 20:11 j-pdx

+1, have had massive problems trying to get a work around for this. Nested forms might solve the 1-many problem (albiet a messy), but I still ran into problems where the name of property is itself dynamic. i.e. innerForm.dynaminPropertyName Had to create a hacky directive to 'correct' the name of the input on the form in the scope as they were being compiled.

mtgleeson avatar Nov 15 '13 14:11 mtgleeson

+1 !!

chekyassine avatar Nov 15 '13 17:11 chekyassine

:+1:

jtammen avatar Nov 18 '13 16:11 jtammen

+1

timelf123 avatar Nov 19 '13 18:11 timelf123

+1

daanl avatar Nov 24 '13 15:11 daanl

:+1:

blaise-io avatar Nov 25 '13 11:11 blaise-io

+1

gschuager avatar Nov 30 '13 13:11 gschuager

+1

marcusradell avatar Dec 06 '13 15:12 marcusradell

+1

brentmitch avatar Dec 06 '13 18:12 brentmitch

+1

andrewmurray avatar Dec 16 '13 14:12 andrewmurray

+1

maxbates avatar Dec 16 '13 19:12 maxbates

+1

cristobalchao avatar Dec 18 '13 04:12 cristobalchao

+1 The following example shows the problem more clearly: http://jsfiddle.net/Thinkscape/bbCVf/

Thinkscape avatar Dec 18 '13 16:12 Thinkscape

If you need this behaviour prior to 1.3, you can easily do something like http://plnkr.co/edit/hSMzWC?p=preview (or in a more no-conflicty fashion http://plnkr.co/edit/VnHHEe?p=preview) --- There are currently pull requests open for this feature (#4791 and #5231 respectively, but actually quite a few more), feel free to vouch for those and test them out

caitp avatar Dec 18 '13 17:12 caitp

@caitp thank you! Here's an an example using the workaround in my context: http://jsfiddle.net/Thinkscape/23RPt/

Thinkscape avatar Dec 18 '13 17:12 Thinkscape

+1 would love to see this properly resolved as a feature of AngularJs and not needing a hack.

kalisjoshua avatar Jan 24 '14 03:01 kalisjoshua