-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample.html
60 lines (60 loc) · 22.7 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html ng-app="app" ng-controller="MainControl">
<head>
<meta charset="UTF-8">
<title>angular-tree-veiw example</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="./deps/angular-tree-view.min.css">
<link rel="stylesheet" href="./dist/angular-dual-multi-select.min.css">
<script src="http://cdn.bootcss.com/angular.js/1.4.5/angular.min.js"></script>
<script src="./deps/angular-tree-view.min.js"></script>
<script src="./dist/angular-dual-multi-select.js"></script>
</head>
<body>
<div ng-if="test">
<dualmultiselect
ng-model="form.value"
input-model="test"
recursion-check="true"
output-all-info="false"
output-duplicate="false"
options="{displayProperty: 'dirName', valueProperty: 'dirId'}"></dualmultiselect>
</div>
<button ng-click="testClick()">start</button>
{{form.value}}
<div>
<button ng-click="pushToLeft()">
push to left
</button>
</div>
<script>
angular.module('app', ['DualMultiSelect'])
.controller('MainControl', function ($scope, treeViewService) {
$scope.testClick = function () {
$scope.test = {"totalCount":28,"data":[{"children":[{"dirName":"情感生活","dirId":"secondDir0"},{"dirName":"感情文化","dirId":"secondDir1"},{"dirName":"年代秀","dirId":"secondDir2"},{"dirName":"美色","dirId":"secondDir3"},{"dirName":"恋爱","dirId":"secondDir4"},{"dirName":"其他情感话题","dirId":"secondDir5"},{"dirName":"男性话题","dirId":"secondDir6"},{"dirName":"婚姻家庭","dirId":"secondDir7"},{"dirName":"女性话题","dirId":"secondDir8"}],"dirName":"情感","dirId":"firstDir0"},{"children":[{"dirName":"北京","dirId":"secondDir9"},{"dirName":"重庆","dirId":"secondDir10"},{"dirName":"新疆","dirId":"secondDir11"},{"dirName":"广东","dirId":"secondDir12"},{"dirName":"天津","dirId":"secondDir13"},{"dirName":"浙江","dirId":"secondDir14"},{"dirName":"广西","dirId":"secondDir15"},{"dirName":"内蒙古","dirId":"secondDir16"},{"dirName":"宁夏","dirId":"secondDir17"},{"dirName":"江西","dirId":"secondDir18"},{"dirName":"贵州","dirId":"secondDir19"},{"dirName":"安徽","dirId":"secondDir20"},{"dirName":"陕西","dirId":"secondDir21"},{"dirName":"辽宁","dirId":"secondDir22"},{"dirName":"山西","dirId":"secondDir23"},{"dirName":"港澳台","dirId":"secondDir24"},{"dirName":"青海","dirId":"secondDir25"},{"dirName":"四川","dirId":"secondDir26"},{"dirName":"江苏","dirId":"secondDir27"},{"dirName":"其他地区及话题","dirId":"secondDir28"},{"dirName":"河北","dirId":"secondDir29"},{"dirName":"西藏","dirId":"secondDir30"},{"dirName":"福建","dirId":"secondDir31"},{"dirName":"吉林","dirId":"secondDir32"},{"dirName":"云南","dirId":"secondDir33"},{"dirName":"上海","dirId":"secondDir34"},{"dirName":"海南","dirId":"secondDir35"},{"dirName":"湖北","dirId":"secondDir36"},{"dirName":"甘肃","dirId":"secondDir37"},{"dirName":"湖南","dirId":"secondDir38"},{"dirName":"山东","dirId":"secondDir39"},{"dirName":"河南","dirId":"secondDir40"},{"dirName":"海外","dirId":"secondDir41"},{"dirName":"黑龙江","dirId":"secondDir42"}],"dirName":"地区","dirId":"firstDir1"},{"children":[{"dirName":"沪市A股","dirId":"secondDir43"},{"dirName":"期货/权证","dirId":"secondDir44"},{"dirName":"债券","dirId":"secondDir45"},{"dirName":"金融组织机构","dirId":"secondDir46"},{"dirName":"其他金融服务及产品","dirId":"secondDir47"},{"dirName":"深市A股","dirId":"secondDir48"},{"dirName":"基金","dirId":"secondDir49"},{"dirName":"B股","dirId":"secondDir50"}],"dirName":"金融","dirId":"firstDir2"},{"children":[{"dirName":"网友俱乐部","dirId":"secondDir51"},{"dirName":"个人贴吧","dirId":"secondDir52"},{"dirName":"其他","dirId":"secondDir53"},{"dirName":"百度知道用户团队","dirId":"secondDir54"},{"dirName":"虚拟角色扮演","dirId":"secondDir55"},{"dirName":" 网友俱乐部","dirId":"secondDir56"}],"dirName":"网友俱乐部","dirId":"firstDir3"},{"children":[{"dirName":"旅游","dirId":"secondDir57"},{"dirName":"时尚美容","dirId":"secondDir58"},{"dirName":"宠物","dirId":"secondDir59"},{"dirName":"休闲活动","dirId":"secondDir60"},{"dirName":"原创音视频话题","dirId":"secondDir61"},{"dirName":"母婴","dirId":"secondDir62"},{"dirName":"贴图","dirId":"secondDir63"},{"dirName":"兴趣收藏","dirId":"secondDir64"},{"dirName":"杂志期刊","dirId":"secondDir65"},{"dirName":"节日","dirId":"secondDir66"},{"dirName":"娱乐八卦","dirId":"secondDir67"},{"dirName":"饮食","dirId":"secondDir68"},{"dirName":"其他生活话题","dirId":"secondDir69"},{"dirName":"星座运势","dirId":"secondDir70"},{"dirName":"健康保健","dirId":"secondDir71"}],"dirName":"生活","dirId":"firstDir4"},{"children":[{"dirName":"百度其他产品服务","dirId":"secondDir72"},{"dirName":"贴吧管理中心","dirId":"secondDir73"},{"dirName":"贴吧活动与交流","dirId":"secondDir74"},{"dirName":"食品饮料企业","dirId":"secondDir75"}],"dirName":"百度服务中心","dirId":"firstDir5"},{"children":[{"dirName":"电脑数码话题","dirId":"secondDir76"},{"dirName":"数码家电","dirId":"secondDir77"},{"dirName":"手机","dirId":"secondDir78"},{"dirName":"电脑及硬件","dirId":"secondDir79"}],"dirName":"电脑数码","dirId":"firstDir6"},{"children":[{"dirName":"动漫相关","dirId":"secondDir80"},{"dirName":"动漫角色","dirId":"secondDir81"},{"dirName":"动漫作者","dirId":"secondDir82"},{"dirName":"动漫·轻小说作品","dirId":"secondDir83"},{"dirName":"动漫声优","dirId":"secondDir84"},{"dirName":"动漫同人","dirId":"secondDir85"}],"dirName":"动漫","dirId":"firstDir7"},{"children":[{"dirName":"其他地区电影","dirId":"secondDir86"},{"dirName":"香港电影","dirId":"secondDir87"},{"dirName":"东南亚电影","dirId":"secondDir88"},{"dirName":"电影话题","dirId":"secondDir89"},{"dirName":"韩国电影","dirId":"secondDir90"},{"dirName":"欧美电影","dirId":"secondDir91"},{"dirName":"内地电影","dirId":"secondDir92"},{"dirName":"日本电影","dirId":"secondDir93"},{"dirName":"台湾电影","dirId":"secondDir94"}],"dirName":"电影","dirId":"firstDir8"},{"children":[{"dirName":"掌机游戏","dirId":"secondDir95"},{"dirName":"游戏角色","dirId":"secondDir96"},{"dirName":"小游戏","dirId":"secondDir97"},{"dirName":"其他游戏及话题","dirId":"secondDir98"},{"dirName":"单机游戏","dirId":"secondDir99"},{"dirName":"桌游","dirId":"secondDir100"},{"dirName":"手机游戏","dirId":"secondDir101"},{"dirName":"客户端网游","dirId":"secondDir102"},{"dirName":"电视游戏","dirId":"secondDir103"},{"dirName":"网页版网游","dirId":"secondDir104"}],"dirName":"游戏","dirId":"firstDir9"},{"children":[{"dirName":"西班牙足球俱乐部及赛事","dirId":"secondDir105"},{"dirName":"体操明星","dirId":"secondDir106"},{"dirName":"乒羽明星","dirId":"secondDir107"},{"dirName":"其他体育项目及赛事","dirId":"secondDir108"},{"dirName":"nba球队及赛事","dirId":"secondDir109"},{"dirName":"篮球明星","dirId":"secondDir110"},{"dirName":"水上运动","dirId":"secondDir111"},{"dirName":"其他足球俱乐部及赛事","dirId":"secondDir112"},{"dirName":"电子竞技及选手","dirId":"secondDir113"},{"dirName":"冬季项目明星","dirId":"secondDir114"},{"dirName":"棋牌类","dirId":"secondDir115"},{"dirName":"田径明星","dirId":"secondDir116"},{"dirName":"休闲体育","dirId":"secondDir117"},{"dirName":"台球明星","dirId":"secondDir118"},{"dirName":"其他体育明星","dirId":"secondDir119"},{"dirName":"法国足球俱乐部及赛事","dirId":"secondDir120"},{"dirName":"足球明星","dirId":"secondDir121"},{"dirName":"田径","dirId":"secondDir122"},{"dirName":"网球明星","dirId":"secondDir123"},{"dirName":"英国足球俱乐部及赛事","dirId":"secondDir124"},{"dirName":"排球","dirId":"secondDir125"},{"dirName":"舞蹈","dirId":"secondDir126"},{"dirName":"德国足球俱乐部及赛事","dirId":"secondDir127"},{"dirName":"水上运动明星","dirId":"secondDir128"},{"dirName":"冰上运动","dirId":"secondDir129"},{"dirName":"武术搏击","dirId":"secondDir130"},{"dirName":"中国足球俱乐部及赛事","dirId":"secondDir131"},{"dirName":"体育相关话题","dirId":"secondDir132"},{"dirName":"乒羽·网球","dirId":"secondDir133"},{"dirName":"台球","dirId":"secondDir134"},{"dirName":"赛车","dirId":"secondDir135"},{"dirName":"体育记者及媒体","dirId":"secondDir136"},{"dirName":"cba球队及赛事","dirId":"secondDir137"},{"dirName":"排球明星","dirId":"secondDir138"},{"dirName":"足球国家队及协会","dirId":"secondDir139"},{"dirName":"篮球国家队、协会及赛事","dirId":"secondDir140"},{"dirName":"意大利足球俱乐部及赛事","dirId":"secondDir141"},{"dirName":"赛车明星","dirId":"secondDir142"}],"dirName":"体育","dirId":"firstDir10"},{"children":[{"dirName":"电视剧话题","dirId":"secondDir143"},{"dirName":"韩国电视剧","dirId":"secondDir144"},{"dirName":"电视剧角色","dirId":"secondDir145"},{"dirName":"其他地区电视剧","dirId":"secondDir146"},{"dirName":"日本电视剧","dirId":"secondDir147"},{"dirName":"东南亚电视剧","dirId":"secondDir148"},{"dirName":"美剧","dirId":"secondDir149"},{"dirName":"台湾电视剧","dirId":"secondDir150"},{"dirName":"香港电视剧","dirId":"secondDir151"},{"dirName":"内地电视剧","dirId":"secondDir152"}],"dirName":"电视剧","dirId":"firstDir11"},{"children":[{"dirName":"音乐制作人","dirId":"secondDir153"},{"dirName":"2012中国好声音","dirId":"secondDir154"},{"dirName":"韩国明星","dirId":"secondDir155"},{"dirName":"导演","dirId":"secondDir156"},{"dirName":"内地明星","dirId":"secondDir157"},{"dirName":"港台东南亚明星","dirId":"secondDir158"},{"dirName":"其他娱乐明星","dirId":"secondDir159"},{"dirName":"明星官方吧","dirId":"secondDir160"},{"dirName":"娱乐明星话题","dirId":"secondDir161"},{"dirName":"主持人","dirId":"secondDir162"},{"dirName":"其他粉丝组织","dirId":"secondDir163"},{"dirName":"日本明星","dirId":"secondDir164"},{"dirName":"时尚人物","dirId":"secondDir165"},{"dirName":"戏曲曲艺明星","dirId":"secondDir166"},{"dirName":"欧美明星","dirId":"secondDir167"}],"dirName":"娱乐明星","dirId":"firstDir12"},{"children":[{"dirName":"海南中小学","dirId":"secondDir168"},{"dirName":"北京中小学","dirId":"secondDir169"},{"dirName":"广西中小学","dirId":"secondDir170"},{"dirName":"重庆中小学","dirId":"secondDir171"},{"dirName":"云南中小学","dirId":"secondDir172"},{"dirName":"宁夏中小学","dirId":"secondDir173"},{"dirName":"上海中小学","dirId":"secondDir174"},{"dirName":"山东中小学","dirId":"secondDir175"},{"dirName":"河北中小学","dirId":"secondDir176"},{"dirName":"青海中小学","dirId":"secondDir177"},{"dirName":"湖北中小学","dirId":"secondDir178"},{"dirName":"浙江中小学","dirId":"secondDir179"},{"dirName":"辽宁中小学","dirId":"secondDir180"},{"dirName":"其他地区中小学及话题","dirId":"secondDir181"},{"dirName":"甘肃中小学","dirId":"secondDir182"},{"dirName":"新疆中小学","dirId":"secondDir183"},{"dirName":"天津中小学","dirId":"secondDir184"},{"dirName":"福建中小学","dirId":"secondDir185"},{"dirName":"山西中小学","dirId":"secondDir186"},{"dirName":"江西中小学","dirId":"secondDir187"},{"dirName":"内蒙古中小学","dirId":"secondDir188"},{"dirName":"吉林中小学","dirId":"secondDir189"},{"dirName":"江苏中小学","dirId":"secondDir190"},{"dirName":"贵州中小学","dirId":"secondDir191"},{"dirName":"安徽中小学","dirId":"secondDir192"},{"dirName":"河南中小学","dirId":"secondDir193"},{"dirName":"湖南中小学","dirId":"secondDir194"},{"dirName":"西藏中小学","dirId":"secondDir195"},{"dirName":"陕西中小学","dirId":"secondDir196"},{"dirName":"黑龙江中小学","dirId":"secondDir197"},{"dirName":"四川中小学","dirId":"secondDir198"},{"dirName":"广东中小学","dirId":"secondDir199"}],"dirName":"中小学","dirId":"firstDir13"},{"children":[{"dirName":"都市·言情小说","dirId":"secondDir200"},{"dirName":"严肃小说","dirId":"secondDir201"},{"dirName":"其他小说作品","dirId":"secondDir202"},{"dirName":"儿童文学","dirId":"secondDir203"},{"dirName":"文学话题","dirId":"secondDir204"},{"dirName":"科幻小说","dirId":"secondDir205"},{"dirName":"中国近现代作家","dirId":"secondDir206"},{"dirName":"外国作家","dirId":"secondDir207"},{"dirName":"中国当代作家","dirId":"secondDir208"},{"dirName":"当代其他文学作品","dirId":"secondDir209"},{"dirName":"奇幻·玄幻小说","dirId":"secondDir210"},{"dirName":"近现代文学作品","dirId":"secondDir211"},{"dirName":"古典文学","dirId":"secondDir212"},{"dirName":"灵异·超能力小说","dirId":"secondDir213"},{"dirName":"文学期刊","dirId":"secondDir214"},{"dirName":"文学人物","dirId":"secondDir215"},{"dirName":"古言小说","dirId":"secondDir216"},{"dirName":"悬疑·推理小说","dirId":"secondDir217"},{"dirName":"外国文学","dirId":"secondDir218"},{"dirName":"军事·历史小说","dirId":"secondDir219"},{"dirName":"中国古代作家","dirId":"secondDir220"},{"dirName":"传统武侠小说","dirId":"secondDir221"},{"dirName":"游戏小说","dirId":"secondDir222"}],"dirName":"文学","dirId":"firstDir14"},{"children":[{"dirName":"职业话题","dirId":"secondDir223"},{"dirName":"社会机构","dirId":"secondDir224"},{"dirName":"医疗机构","dirId":"secondDir225"},{"dirName":"公益慈善","dirId":"secondDir226"},{"dirName":"社会事件及话题","dirId":"secondDir227"}],"dirName":"社会","dirId":"firstDir15"},{"children":[{"dirName":"姓氏文化","dirId":"secondDir228"},{"dirName":"鉴赏收藏","dirId":"secondDir229"},{"dirName":"宗教","dirId":"secondDir230"},{"dirName":"自然","dirId":"secondDir231"},{"dirName":"动植物","dirId":"secondDir232"},{"dirName":"历史","dirId":"secondDir233"},{"dirName":"语言文化","dirId":"secondDir234"},{"dirName":"其他自然话题","dirId":"secondDir235"},{"dirName":"其他人文话题","dirId":"secondDir236"},{"dirName":"社会科学话题","dirId":"secondDir237"},{"dirName":"民族文化","dirId":"secondDir238"},{"dirName":"军事","dirId":"secondDir239"},{"dirName":"艺术","dirId":"secondDir240"}],"dirName":"人文自然","dirId":"firstDir16"},{"children":[{"dirName":"汽车制造业","dirId":"secondDir241"},{"dirName":"餐饮美食","dirId":"secondDir242"},{"dirName":"能源/冶金/建材","dirId":"secondDir243"},{"dirName":"批发零售业","dirId":"secondDir244"},{"dirName":"纺织/化工/化学品","dirId":"secondDir245"},{"dirName":"房地产","dirId":"secondDir246"},{"dirName":"建筑业","dirId":"secondDir247"},{"dirName":"机械设备","dirId":"secondDir248"},{"dirName":"互联网企业","dirId":"secondDir249"},{"dirName":"医药保健企业","dirId":"secondDir250"},{"dirName":"企业话题","dirId":"secondDir251"},{"dirName":"生活服务业","dirId":"secondDir252"},{"dirName":"美容保健","dirId":"secondDir253"},{"dirName":"服装服饰企业","dirId":"secondDir254"},{"dirName":"商务服务业","dirId":"secondDir255"},{"dirName":"家居用品","dirId":"secondDir256"},{"dirName":"农林牧渔","dirId":"secondDir257"},{"dirName":"包装/印刷/纸业","dirId":"secondDir258"},{"dirName":"IT行业","dirId":"secondDir259"},{"dirName":"数码家电","dirId":"secondDir260"},{"dirName":"娱乐休闲","dirId":"secondDir261"},{"dirName":"交通运输、仓储和邮政业","dirId":"secondDir262"},{"dirName":"其他类型企业","dirId":"secondDir263"},{"dirName":"商场购物","dirId":"secondDir264"}],"dirName":"企业","dirId":"firstDir17"},{"children":[{"dirName":"云南院校","dirId":"secondDir265"},{"dirName":"贵州院校","dirId":"secondDir266"},{"dirName":"河南院校","dirId":"secondDir267"},{"dirName":"山东院校","dirId":"secondDir268"},{"dirName":"江西院校","dirId":"secondDir269"},{"dirName":"山西院校","dirId":"secondDir270"},{"dirName":"湖北院校","dirId":"secondDir271"},{"dirName":"上海院校","dirId":"secondDir272"},{"dirName":"新疆院校","dirId":"secondDir273"},{"dirName":"海南院校","dirId":"secondDir274"},{"dirName":"校园青春","dirId":"secondDir275"},{"dirName":"港澳台院校","dirId":"secondDir276"},{"dirName":"重庆院校","dirId":"secondDir277"},{"dirName":"安徽院校","dirId":"secondDir278"},{"dirName":"内蒙古院校","dirId":"secondDir279"},{"dirName":"天津院校","dirId":"secondDir280"},{"dirName":"海外院校","dirId":"secondDir281"},{"dirName":"陕西院校","dirId":"secondDir282"},{"dirName":"吉林院校","dirId":"secondDir283"},{"dirName":"河北院校","dirId":"secondDir284"},{"dirName":"宁夏院校","dirId":"secondDir285"},{"dirName":"学校话题","dirId":"secondDir286"},{"dirName":"黑龙江院校","dirId":"secondDir287"},{"dirName":"湖南院校","dirId":"secondDir288"},{"dirName":"浙江院校","dirId":"secondDir289"},{"dirName":"江苏院校","dirId":"secondDir290"},{"dirName":"福建院校","dirId":"secondDir291"},{"dirName":"四川院校","dirId":"secondDir292"},{"dirName":"甘肃院校","dirId":"secondDir293"},{"dirName":"广西院校","dirId":"secondDir294"},{"dirName":"青海院校","dirId":"secondDir295"},{"dirName":"辽宁院校","dirId":"secondDir296"},{"dirName":"西藏院校","dirId":"secondDir297"},{"dirName":"广东院校","dirId":"secondDir298"},{"dirName":"北京院校","dirId":"secondDir299"}],"dirName":"高等院校","dirId":"firstDir18"},{"children":[{"dirName":"当代社会科学人物","dirId":"secondDir300"},{"dirName":"热点新闻人物","dirId":"secondDir301"},{"dirName":"当代军事政治人物","dirId":"secondDir302"},{"dirName":"商业人物","dirId":"secondDir303"},{"dirName":"当代艺术人物","dirId":"secondDir304"},{"dirName":"当代自然科学人物","dirId":"secondDir305"},{"dirName":"其他当代人物","dirId":"secondDir306"}],"dirName":"当代人物","dirId":"firstDir19"},{"children":[{"dirName":"欧美流行音乐","dirId":"secondDir307"},{"dirName":"港台流行音乐","dirId":"secondDir308"},{"dirName":"摇滚音乐","dirId":"secondDir309"},{"dirName":"古典音乐\u0026轻音乐","dirId":"secondDir310"},{"dirName":"民歌","dirId":"secondDir311"},{"dirName":"乐器","dirId":"secondDir312"},{"dirName":"日本流行音乐","dirId":"secondDir313"},{"dirName":"少儿歌曲","dirId":"secondDir314"},{"dirName":"内地流行音乐","dirId":"secondDir315"},{"dirName":"韩国流行音乐","dirId":"secondDir316"},{"dirName":"其他地区流行音乐","dirId":"secondDir317"},{"dirName":"音乐话题","dirId":"secondDir318"}],"dirName":"音乐","dirId":"firstDir20"},{"children":[{"dirName":"计算机软件","dirId":"secondDir319"},{"dirName":"其他计算机相关","dirId":"secondDir320"},{"dirName":"互联网产品及话题","dirId":"secondDir321"},{"dirName":"其他科技话题","dirId":"secondDir322"},{"dirName":"自然科学话题","dirId":"secondDir323"},{"dirName":"程序设计","dirId":"secondDir324"}],"dirName":"科学技术","dirId":"firstDir21"},{"children":[{"dirName":"生活服务","dirId":"secondDir325"},{"dirName":"交通运输","dirId":"secondDir326"},{"dirName":"网络通信服务","dirId":"secondDir327"},{"dirName":"其他类型服务","dirId":"secondDir328"},{"dirName":"商务服务","dirId":"secondDir329"},{"dirName":"开采·加工","dirId":"secondDir330"}],"dirName":"商业服务","dirId":"firstDir22"},{"children":[{"dirName":"家居用品","dirId":"secondDir331"},{"dirName":"服装服饰","dirId":"secondDir332"},{"dirName":"交通工具、配件及设施","dirId":"secondDir333"},{"dirName":"食品饮料","dirId":"secondDir334"},{"dirName":"箱包配饰","dirId":"secondDir335"},{"dirName":"其他生活用品及话题","dirId":"secondDir336"},{"dirName":"个护化妆","dirId":"secondDir337"},{"dirName":"文教·体育·娱乐和工美用品","dirId":"secondDir338"},{"dirName":"汽车及配件","dirId":"secondDir339"},{"dirName":"医药保健","dirId":"secondDir340"}],"dirName":"生活用品","dirId":"firstDir23"},{"children":[{"dirName":"中国近现代历史人物","dirId":"secondDir341"},{"dirName":"历史人物话题","dirId":"secondDir342"},{"dirName":"中国古代历史人物","dirId":"secondDir343"},{"dirName":"外国历史人物","dirId":"secondDir344"}],"dirName":"历史人物","dirId":"firstDir24"},{"children":[{"dirName":"培训机构","dirId":"secondDir345"},{"dirName":"高等教育","dirId":"secondDir346"},{"dirName":"外语学习","dirId":"secondDir347"},{"dirName":"基础教育","dirId":"secondDir348"},{"dirName":"留学","dirId":"secondDir349"},{"dirName":"教育话题","dirId":"secondDir350"},{"dirName":"职业技能考试与培训","dirId":"secondDir351"}],"dirName":"教育培训","dirId":"firstDir25"},{"children":[{"dirName":"音乐·文艺","dirId":"secondDir352"},{"dirName":"其他节目及话题","dirId":"secondDir353"},{"dirName":"广播电台","dirId":"secondDir354"},{"dirName":"电视台及频道","dirId":"secondDir355"},{"dirName":"财经·职场","dirId":"secondDir356"},{"dirName":"少儿·教育","dirId":"secondDir357"},{"dirName":"内地综艺","dirId":"secondDir358"},{"dirName":"韩国综艺","dirId":"secondDir359"},{"dirName":"时尚·生活服务","dirId":"secondDir360"},{"dirName":"台湾综艺","dirId":"secondDir361"},{"dirName":"科教记录·社会与法","dirId":"secondDir362"},{"dirName":"体育运动·健身","dirId":"secondDir363"},{"dirName":"新闻资讯","dirId":"secondDir364"}],"dirName":"电视节目","dirId":"firstDir26"},{"children":[{"dirName":"农林牧渔","dirId":"secondDir365"},{"dirName":"电子电工","dirId":"secondDir366"},{"dirName":"包装/印刷/纸业","dirId":"secondDir367"},{"dirName":"能源/冶金/建材","dirId":"secondDir368"},{"dirName":"纺织/化工/化学品","dirId":"secondDir369"},{"dirName":"其他工农业产品及话题","dirId":"secondDir370"},{"dirName":"机械设备","dirId":"secondDir371"},{"dirName":"安全防护","dirId":"secondDir372"},{"dirName":"医疗器械","dirId":"secondDir373"}],"dirName":"工农业产品","dirId":"firstDir27"}],"success":true}.data;
};
$scope.form = {
value: []
};
$scope.pushToLeft = function () {
var itemToPush = {
dirId: 'addNewItem1',
dirName: 'addNewItem',
children: [
{
dirId: 'addNewItem2',
dirName: 'addNewItem2'
},
{
dirId: 'addNewItem3',
dirName: 'addNewItem3'
}
]
};
$scope.test.unshift(itemToPush);
treeViewService.applyChanges($scope.test, 'addNewItem', itemToPush);
};
});
</script>
</body>
</html>