Dart- How to convert map data into form by angular dart interface? -


i have map data following:

{ "recipeid"   :"000682", "recipename" :"my favaorite one", "updateuser" :"tek" } 

how should convert map form including label , text input, example,

   label (key)   :  text input(value)  - recipeid      :  _______________    - recipename    :  _______________  - updateuser    :  _______________ 

i tried following method, seems fail.

<span ng-model="selectedrecipe">   <form ng-repeat="items in selectedrecipe">     <label>items[keys]</label>     <input type="text" ng-model="items[values]"></input>   </form> </span> 

assuming selectedrecipe map<string,string>, , workaround this issue, add getter access keys of map iterable:

get selectedrecipekeys => selectedrecipe.keys; 

and then, can use in ng-repeat way:

<span ng-model="selectedrecipe">   <form ng-repeat="key in selectedrecipekeys">     <label>{{key}}</label>     <input type="text" ng-model="selectedrecipe[key]">   </form> </span> 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -