Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 无法使用mvc中的角度嵌套组合框库绑定角度嵌套组合框树状视图?_Javascript_C#_Angularjs_Combobox_Treeview - Fatal编程技术网

Javascript 无法使用mvc中的角度嵌套组合框库绑定角度嵌套组合框树状视图?

Javascript 无法使用mvc中的角度嵌套组合框库绑定角度嵌套组合框树状视图?,javascript,c#,angularjs,combobox,treeview,Javascript,C#,Angularjs,Combobox,Treeview,我尝试使用github中的这个库绑定combobox treeview 当我尝试在mvc项目中使用这个库时,我遇到了一些问题。问题无法找到在ng-nested-combobox.js中使用的select-group.html的路径。基本上没有执行ng-nested-COMBOX.js,我在ng-nested-COMBOX.js中尝试了警报('hi'),但无法执行:( Index.cshtml <script src="https://cdnjs.cloudflare.com/ajax/li

我尝试使用github中的这个库绑定combobox treeview

当我尝试在mvc项目中使用这个库时,我遇到了一些问题。问题无法找到在ng-nested-combobox.js中使用的select-group.html的路径。基本上没有执行ng-nested-COMBOX.js,我在ng-nested-COMBOX.js中尝试了警报('hi'),但无法执行:(

Index.cshtml

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.4/angular.min.js"></script>
<link href="~/Content/nestedCombobox.css" rel="stylesheet" />
<script src="~/Scripts/ng-nested-combobox.js"></script>

  <div class="container" data-ng-controller="demoController as demo">
            <h2>Demo ng-nested-combobox</h2>
            <div class="col">
                <nested-combo-box control-class="col-md-7" control-disabled="false" change-event="demo.changeItem" collection="demo.collection" current-member="demo.activeItem" />
            </div>
            <div class="col code">
                <p>Selected item:</p>
                <pre>{{demo.selectedItem | json}}</pre>
            </div>
        </div>

演示ng嵌套组合框
选定项目:

{{demo.selectedItem | json}
index.js

var-app=angular.module('mydemo',['ui.nested.combobox','angularTreeview','ngTable']);
app.controller('demoController',函数($scope、$filter、ngTableParams、$http){
var=这个;
此.collection1=[
{
id:1,
名称:'item1',
儿童:[
{
id:2,
名称:'item1_1'
},
{
id:3,
名称:'item2_2'
}
]
},
{
id:4,
名称:'item2',
儿童:[
{
id:5,
名称:“项目2\u 1”
},
{
id:6,
名称:'item2_2',
儿童:[
{
id:7,
名称:“项目2\u 2\u 1”
},
{
id:8,
名称:'item2_2_2'
}
]
}
]
}
];
this.collection=this.collection1;
this.changeItem=函数(值){
that.selectedItem=值;
}
this.activeItem={
id:2,
名称:'item1_1'
}
Index.cshtml
演示ng嵌套组合框
选定项目:

{{demo.selectedItem | json} index.js var app=angular.module('mydemo',['ui.nested.combobox','angularTreeview','ngTable']); app.controller('demoController',函数($scope、$filter、ngTableParams、$http){ var=这个; 此.collection1=[ { id:1, 名称:'item1', 儿童:[ { id:2, 名称:'item1_1' }, { id:3, 名称:'item2_2' } ] }, { id:4, 名称:'item2', 儿童:[ { id:5, 名称:“项目2\u 1” }, { id:6, 名称:'item2_2', 儿童:[ { id:7, 名称:“项目2\u 2\u 1” }, { id:8, 名称:'item2_2_2' } ] } ] } ]; this.collection=this.collection1; this.changeItem=函数(值){ that.selectedItem=值; } this.activeItem={ id:2, 名称:'item1_1' }
 var app = angular.module('mydemo', ['ui.nested.combobox','angularTreeview', 'ngTable']);
    app.controller('demoController', function ($scope, $filter, ngTableParams, $http) {
        var that = this;
        this.collection1 = [
                {
                    id: 1,
                    name: 'item1',
                    childrens: [
                        {
                            id: 2,
                            name: 'item1_1'
                        },
                        {
                            id: 3,
                            name: 'item2_2'
                        }
                    ]
                },
                {
                    id: 4,
                    name: 'item2',
                    childrens: [
                        {
                            id: 5,
                            name: 'item2_1'
                        },
                        {
                            id: 6,
                            name: 'item2_2',
                            childrens: [
                                {
                                    id: 7,
                                    name: 'item2_2_1'
                                },
                                {
                                    id: 8,
                                    name: 'item2_2_2'
                                }
                            ]
                        }
                    ]

                }
        ];



        this.collection = this.collection1;


        this.changeItem = function (value) {
            that.selectedItem = value;
        }

        this.activeItem = {
            id: 2,
            name: 'item1_1'
        }


Index.cshtml

    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.4/angular.min.js"></script>
    <link href="~/Content/nestedCombobox.css" rel="stylesheet" />
    <script src="~/Scripts/ng-nested-combobox.js"></script>

      <div class="container" data-ng-controller="demoController as demo">
                <h2>Demo ng-nested-combobox</h2>
                <div class="col">
                    <nested-combo-box control-class="col-md-7" control-disabled="false" change-event="demo.changeItem" collection="demo.collection" current-member="demo.activeItem" />
                </div>
                <div class="col code">
                    <p>Selected item:</p>
                    <pre>{{demo.selectedItem | json}}</pre>
                </div>
            </div>

index.js


    var app = angular.module('mydemo', ['ui.nested.combobox','angularTreeview', 'ngTable']);
        app.controller('demoController', function ($scope, $filter, ngTableParams, $http) {
            var that = this;
            this.collection1 = [
                    {
                        id: 1,
                        name: 'item1',
                        childrens: [
                            {
                                id: 2,
                                name: 'item1_1'
                            },
                            {
                                id: 3,
                                name: 'item2_2'
                            }
                        ]
                    },
                    {
                        id: 4,
                        name: 'item2',
                        childrens: [
                            {
                                id: 5,
                                name: 'item2_1'
                            },
                            {
                                id: 6,
                                name: 'item2_2',
                                childrens: [
                                    {
                                        id: 7,
                                        name: 'item2_2_1'
                                    },
                                    {
                                        id: 8,
                                        name: 'item2_2_2'
                                    }
                                ]
                            }
                        ]

                    }
            ];



            this.collection = this.collection1;


            this.changeItem = function (value) {
                that.selectedItem = value;
            }

            this.activeItem = {
                id: 2,
                name: 'item1_1'
            }