Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.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
Jquery sortable()不处理ng网格中的行_Jquery_Angularjs_Ng Grid - Fatal编程技术网

Jquery sortable()不处理ng网格中的行

Jquery sortable()不处理ng网格中的行,jquery,angularjs,ng-grid,Jquery,Angularjs,Ng Grid,我正在尝试将sortable应用于ng网格中的行。 行实际上是被拖动的,但没有被删除。 我的代码: <div class="gridStyle" ng-grid="gridOpt"></div> var app = angular.module("app", ['ngGrid']); app.controller("ctrl", function($scope) { $scope.myData = [{name: "Brian", age: 29},

我正在尝试将sortable应用于ng网格中的行。 行实际上是被拖动的,但没有被删除。
我的代码:

 <div class="gridStyle" ng-grid="gridOpt"></div>
    var app = angular.module("app", ['ngGrid']);
app.controller("ctrl", function($scope) {


    $scope.myData = [{name: "Brian", age: 29},
                     {name: "Doug", age: 25},
                     {name: "Bill", age: 27},
                     {name: "Amy", age: 29},
                     {name: "Bob", age: 34}];
    $scope.gridOpt = {
        data: 'myData',
        columnDefs: [
      { field: 'name', displayName: 'name', width: '64px' },
      { field: 'age', displayName: 'age' }
    ],
        rowTemplate:'<div id="id1" style="height: 100%" 
        ng-class="{green: row.getProperty(\'age\')  < 30}"> 
        <div ng-repeat="col in  renderedColumns" class="ngCell 
        col{{$index}}   {{col.cellClass}}" ng-cell></div></div>' };

 setTimeout(function () {
        $('#id1').parent().parent().attr('id', 'sortable');
        $('#sortable').sortable();
  }, 200);


});

var-app=angular.module(“app”,['ngGrid']);
应用程序控制器(“ctrl”,函数($scope){
$scope.myData=[{name:“Brian”,年龄:29},
{姓名:“道格”,年龄:25},
{姓名:“比尔”,年龄:27},
{姓名:“艾米”,年龄:29},
{姓名:“鲍勃”,年龄:34}];
$scope.gridOpt={
数据:“myData”,
columnDefs:[
{字段:'name',显示名称:'name',宽度:'64px'},
{字段:'age',显示名称:'age'}
],
行模板:'
' };
setTimeout(函数(){
$('#id1').parent().parent().attr('id','sortable');
$(“#可排序”).sortable();
}, 200);
});
我不明白为什么拖动后不删除ng网格中的行