Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Angular ngmodel binding to objects

$
0
0

Hi Petyo,

I checked your example and tried to apply it to my use case where a person object references a country object:

var person = { ..., country: { id: 1, name: "Italy" } } 

but this doesn't work. When I instead reference an array like: 

var person = { ..., country: [{ id: 1, name: "Italy" }] }  

then it works (see http://dojo.telerik.com/OQAHE/8) but it does change my model. Can you tell me if there is a solution?

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>