formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.23k stars 406 forks source link

Key with array index saves as object unless array already exists #706

Closed philjolly closed 7 years ago

philjolly commented 7 years ago

If i use a key that contains an array index i.e. things[0].stuff it will only save as an array if i have manually added an empty array to the model before a value is entered. If the parent node is empty it saves as an object with a key of "0".

http://jsbin.com/giwihenoyi/edit?html,js,output

philjolly commented 7 years ago

Well nevermind... as I started picking through the code to see if I could find a fix I realized its an issue with angular.$parse and they wont fix it... https://github.com/angular/angular.js/pull/9850 closing in frustration Reopened issue to follow guidelines for a forthcoming PR