Skip to content

Commit 56cfa74

Browse files
committed
Correct angular way the options
1 parent 82115fc commit 56cfa74

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

demo/angularWayWithOptions.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@
44
*/
55
(function() {
66
'use strict';
7-
angular.module('datatablesSampleApp').controller('angularWayWithOptionsCtrl', function ($scope, $resource, DTOptionsBuilder, DTColumnBuilder) {
7+
angular.module('datatablesSampleApp').controller('angularWayWithOptionsCtrl', function ($scope, $resource, DTOptionsBuilder) {
88
$scope.persons = $resource('data.json').query();
99
$scope.dtOptions = DTOptionsBuilder.newOptions().withPaginationType('full_numbers').withDisplayLength(2);
10-
$scope.dtColumns = [
11-
DTColumnBuilder.newColumn('id').withTitle('ID'),
12-
DTColumnBuilder.newColumn('firstName').withTitle('First name'),
13-
DTColumnBuilder.newColumn('lastName').withTitle('Last name').notVisible()
14-
];
1510
});
16-
})();
11+
})();

demo/partials/angular_way_with_options.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,9 @@ <h1><i class="fa fa-play"></i>&nbsp;The Angular way with options</h1>
5757
<tab heading="JS">
5858
<div hljs language="js">
5959
angular.module('datatablesSampleApp', ['ngResource', 'datatables'])
60-
.controller('angularWayWithOptionsCtrl', function ($scope, $resource, DTOptionsBuilder, DTColumnBuilder) {
60+
.controller('angularWayWithOptionsCtrl', function ($scope, $resource, DTOptionsBuilder) {
6161
$scope.persons = $resource('data.json').query();
6262
$scope.dtOptions = DTOptionsBuilder.newOptions().withPaginationType('full_numbers').withDisplayLength(2);
63-
$scope.dtColumns = [
64-
DTColumnBuilder.newColumn('id').withTitle('ID'),
65-
DTColumnBuilder.newColumn('firstName').withTitle('First name'),
66-
DTColumnBuilder.newColumn('lastName').withTitle('Last name').notVisible()
67-
];
6863
});
6964
</div>
7065
</tab>

0 commit comments

Comments
 (0)