How to bind data when editing after saving linked data in angular.js?
ringa_lee
ringa_lee 2017-05-15 17:02:52
0
1
724

Now I have used Angular to create a three-level linkage between provinces and cities. There is no problem when adding data. But when editing the page, how to bind the saved regional data to each Select, because here The second and third data change according to the selection of the first item. During initialization, It has no value.
For example, if I choose <Guangdong-Dongguan-Wanjiang>, how come when editing, the three drop-down selected items are the <Guangdong-Dongguan-Wanjiang> in front of me. It’s just a piece of cake for newbies, please give some ideas from the experts. If it doesn’t work, you can only use the most original method when editing

ringa_lee
ringa_lee

ringa_lee

reply all(1)
曾经蜡笔没有小新

I don’t quite understand what effect you want. Here is a selection method. Take a look. Angular is a two-way binding. If you directly update the array of the drop-down list, the drop-down list will be displayed. As for displaying the selected item, it seems that a default value is enough. Give it a try. I forgot about it after a long time.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template