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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -