Skip to content

Commit

Permalink
Add import for lodash in DataTable.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszfoltak committed Apr 19, 2016
1 parent 49efb2a commit ad4d402
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#Changelog

## 0.2.4 (2016-04-19)

Bugfixes:

- add import for lodash in file `DataTable.ts`

## 0.2.3 (2016-03-21)

Bugfixes:
Expand Down
7 changes: 3 additions & 4 deletions examples/systemjs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap-theme.min.css">

<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="/node_modules/es6-shim/es6-shim.min.js"></script>
<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="/node_modules/systemjs/dist/system.src.js"></script>
<script src="/node_modules/angular2/bundles/http.min.js"></script>

<script src="node_modules/lodash/lodash.min.js"></script>

<script>
System.config({
defaultJSExtensions: true,
packages: {
"/angular2": {"defaultExtension": false}
},
map: {
'angular2-datatable': 'node_modules/angular2-datatable'
'angular2-datatable': 'node_modules/angular2-datatable',
'lodash': 'node_modules/lodash/lodash.js'
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/systemjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"bootstrap": "^3.3.6",
"es6-shim": "^0.35.0",
"lodash": "^4.6.1",
"mf-angular2-table": "0.0.1",
"angular2-datatable": "0.2.4",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"systemjs": "^0.19.9",
Expand Down
9 changes: 8 additions & 1 deletion examples/systemjs/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2>Simple data table</h2>
<thead>
<tr>
<th style="width: 20%">
<mfDefaultSorter by="name">Name</mfDefaultSorter>
<mfDefaultSorter [by]="sortByWordLength">Name</mfDefaultSorter>
</th>
<th style="width: 50%">
<mfDefaultSorter by="email">Email</mfDefaultSorter>
Expand Down Expand Up @@ -47,5 +47,12 @@ <h2>Simple data table</h2>
</tfoot>
</table>
</div>

<div>
<label>Fruit</label>
<input #fruit>
<label>Price</label>
<input #price>
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions examples/systemjs/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export class App {
return +num;
}

private sortByWordLength = (a: any) => {
return a.name.length;
}

}

bootstrap(App);
2 changes: 1 addition & 1 deletion mf-angular2-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2-datatable",
"version": "0.2.3",
"version": "0.2.4",
"description": "DataTable component for Angular2 framework",
"main": "datatable",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions mf-angular2-table/src/DataTable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Directive, Input, EventEmitter, SimpleChange, OnChanges, DoCheck} from "angular2/core";
import * as _ from "lodash";

export interface SortEvent {
sortBy: string;
Expand Down

0 comments on commit ad4d402

Please sign in to comment.