码迷,mamicode.com
首页 > Web开发 > 详细

angular JS中使用jquery datatable添加ng-click事件

时间:2016-04-18 23:58:59      阅读:855      评论:0      收藏:0      [点我收藏+]

标签:

‘use strict‘;

app.controller(‘DataTableCtrl‘, function ($scope, $compile) {
    $scope.show = function () {
        alert("ddd");
    }
    $scope.simpleTableOptions = {
        sAjaxSource: ‘/Home/Index‘,
        "sServerMethod": "POST",
        "bProcessing": true,
        "bServerSide": true,
        "bPaginate": true,
        aoColumns: [
            { data: ‘id‘ },
            { data: ‘title‘ },
            {
                data: ‘add_time‘, "mRender": function (data) {
                    return ‘<a ng-click="show()">测试</a>‘;
                }, "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
                    
                    $compile(nTd)($scope);
                }
            }
         
        ],
        "sDom": "Tflt<‘row DTTTFooter‘<‘col-sm-6‘i><‘col-sm-6‘p>>",
        "iDisplayLength": 10,
        "oTableTools": {
            "aButtons": [
                "copy", "csv", "xls", "pdf", "print"
            ],
            "sSwfPath": "assets/swf/copy_csv_xls_pdf.swf"
        },
        "language": {
            "search": "",
            "sLengthMenu": "_MENU_",
            "oPaginate": {
                "sPrevious": "上一页",
                "sNext": "下一页"
            }
        },
        "aaSorting": [],

       
    };
});

  的股份大概

angular JS中使用jquery datatable添加ng-click事件

标签:

原文地址:http://www.cnblogs.com/lkd3063601/p/5406076.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!