Skip to content

Commit ad4d402

Browse files
author
mariuszfoltak
committed
Add import for lodash in DataTable.ts
1 parent 49efb2a commit ad4d402

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#Changelog
22

3+
## 0.2.4 (2016-04-19)
4+
5+
Bugfixes:
6+
7+
- add import for lodash in file `DataTable.ts`
8+
39
## 0.2.3 (2016-03-21)
410

511
Bugfixes:

examples/systemjs/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,20 @@
77
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
88
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap-theme.min.css">
99

10-
<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
1110
<script src="/node_modules/es6-shim/es6-shim.min.js"></script>
11+
<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
1212
<script src="/node_modules/systemjs/dist/system.src.js"></script>
1313
<script src="/node_modules/angular2/bundles/http.min.js"></script>
1414

15-
<script src="node_modules/lodash/lodash.min.js"></script>
16-
1715
<script>
1816
System.config({
1917
defaultJSExtensions: true,
2018
packages: {
2119
"/angular2": {"defaultExtension": false}
2220
},
2321
map: {
24-
'angular2-datatable': 'node_modules/angular2-datatable'
22+
'angular2-datatable': 'node_modules/angular2-datatable',
23+
'lodash': 'node_modules/lodash/lodash.js'
2524
}
2625
});
2726
</script>

examples/systemjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"bootstrap": "^3.3.6",
2020
"es6-shim": "^0.35.0",
2121
"lodash": "^4.6.1",
22-
"mf-angular2-table": "0.0.1",
22+
"angular2-datatable": "0.2.4",
2323
"reflect-metadata": "0.1.2",
2424
"rxjs": "5.0.0-beta.2",
2525
"systemjs": "^0.19.9",

examples/systemjs/src/app.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2>Simple data table</h2>
1717
<thead>
1818
<tr>
1919
<th style="width: 20%">
20-
<mfDefaultSorter by="name">Name</mfDefaultSorter>
20+
<mfDefaultSorter [by]="sortByWordLength">Name</mfDefaultSorter>
2121
</th>
2222
<th style="width: 50%">
2323
<mfDefaultSorter by="email">Email</mfDefaultSorter>
@@ -47,5 +47,12 @@ <h2>Simple data table</h2>
4747
</tfoot>
4848
</table>
4949
</div>
50+
51+
<div>
52+
<label>Fruit</label>
53+
<input #fruit>
54+
<label>Price</label>
55+
<input #price>
56+
</div>
5057
</div>
5158
</div>

examples/systemjs/src/app.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export class App {
2727
return +num;
2828
}
2929

30+
private sortByWordLength = (a: any) => {
31+
return a.name.length;
32+
}
33+
3034
}
3135

3236
bootstrap(App);

mf-angular2-table/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-datatable",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"description": "DataTable component for Angular2 framework",
55
"main": "datatable",
66
"scripts": {

mf-angular2-table/src/DataTable.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {Directive, Input, EventEmitter, SimpleChange, OnChanges, DoCheck} from "angular2/core";
2+
import * as _ from "lodash";
23

34
export interface SortEvent {
45
sortBy: string;

0 commit comments

Comments
 (0)