Angular.js custom directives
天蓬老师
天蓬老师 2017-05-15 16:53:51
0
1
533

I just started learning Angular.js, please give me some advice!
The question is as follows:
{
sort:[
{id:1,text:"A"},
{id:2,text:"B"},
{id:3,text:"C"}
],
list:[
{id:1,text:"AA",sort:[1,2]},
{id:2,text:"BB",sort:[1,2]},
{id:3,text:"CC",sort:[2,2]}
]
}

After looping through the list, I hope to write an instruction to convert list.sort
The elements of list.sort correspond to sort.id
Ask for the method code!

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
Peter_Zhu

1. Do you mean the string corresponding to list.sort数组里面的数字,转换成sort.id? If so, you can take a look at a demo I wrote.

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