Skip to content

Commit f3083c9

Browse files
committed
add jQuery usage to example
1 parent 36cbc32 commit f3083c9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"core-js": "^2.4.1",
8686
"http-server": "^0.9.0",
8787
"ie-shim": "^0.1.0",
88+
"jquery": "^3.2.1",
8889
"reflect-metadata": "^0.1.10",
8990
"rxjs": "5.0.2",
9091
"tableexport": "^4.0.7",

src/app/home/home.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ import {
77
import { AppState } from '../app.service';
88
import { Title } from './title';
99
import { XLargeDirective } from './x-large';
10+
1011
import { TableExport } from 'tableexport';
12+
// **** jQuery **************************
13+
// import $ from 'jquery';
14+
// import 'tableexport';
15+
// **************************************
1116

1217
@Component({
1318
/**
@@ -76,7 +81,10 @@ export class HomeComponent implements OnInit, AfterViewChecked {
7681

7782
public ngAfterViewChecked() {
7883
// NOTE: the `reset` is to prevent multiple renders on state change
79-
TableExport(document.querySelector('#default-table')).reset();
84+
new TableExport(document.querySelector('#default-table')).reset();
85+
// **** jQuery **************************
86+
// $('#default-table').tableExport().reset();
87+
// **************************************
8088
}
8189

8290
public submitState(data: string) {

0 commit comments

Comments
 (0)