angularjs - how to set only required properties to angular select object using ng-option? -


i have object array contains objects along many properties. binding select tag using angular ng-options

demolink

once user selects value in combobox, controller property updated(here $scope.selectediem={"selected":""}). selected propriety contains property list name.

eg:

                  {"description":"bank",                      "shortdescription":"dd",                      "value":"xx",                       "enable":null,                       "name":"jhon"                    }, 

but want

                  {                      "shortdescription":"dd",                      "value":"xx",                    }, 

kindly, me how can pass required properties "select object" using ng-options

you can using ng-change, when selecting object need call function using ng-change , in function need deleted unwanted attributes of selecteditem in ng-model

here working plunker

http://embed.plnkr.co/ix1hfv9o3rob0c8acjmp/preview

hope helps!!!


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -