ngx-datatables-net Modern Angular wrapper for DataTables.net

Sorting

Initial multi-column order (Office asc, then Salary desc). Salary uses orthogonal data, sorted as a number, displayed as currency. Shift-click headers to add secondary sorts.

NameOfficeAgeSalary
columns: ConfigColumns[] = [
  { title: 'Name', data: 'name' },
  { title: 'Office', data: 'office' },
  { title: 'Salary', data: 'salary',
    // orthogonal: display currency, sort the raw number
    render: (d, type) => type === 'display' ? formatCurrency(d) : d },
];

options: Config = { order: [[1, 'asc'], [3, 'desc']] };