Angularjs下拉框联动(1)

第一种联动方式,在网上看到的,感觉对于我的使用性不高,比较后端不会提供这种json。。。

Angularjs下拉框联动(1)_第1张图片
实现截图

html

    
    

js

     $scope.selectDatas = [{
                code: 01,
                name: "监控安全类",
                utils: [
                    { code: 0101, name: "遥控门锁" },
                    { code: 0102, name: "声光报警器" },
                    { code: 0103, name: "摄像头" }
                ]
            },
            {
                code: 02,
                name: "大家电",
                utils: [
                    { code: 0201, name: "空调" },
                    { code: 0202, name: "洗衣机" },
                    { code: 0203, name: "洗碗机" }
                ]
            }
        ]

你可能感兴趣的:(Angularjs下拉框联动(1))