Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 1337d81

Browse files
authored
Merge pull request #1703 from l-lin/2023-plans
2023 Demo app update
2 parents c87f19d + 1cec427 commit 1337d81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+875
-266
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="btn-group d-block text-center">
2-
<button class="btn btn-sm btn-dark" (click)="onAction1()">Action 1</button>
2+
<button class="btn btn-sm btn-dark" (click)="onAction1()">{{actionText}}</button>
33
</div>

demo/src/app/advanced/demo-ng-template-ref.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export class DemoNgComponent implements OnInit {
1616
@Input()
1717
data = {};
1818

19+
@Input()
20+
actionText = 'Action 1';
21+
1922
ngOnInit(): void {
2023
}
2124

demo/src/app/advanced/dt-instance.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ describe('DtInstanceComponent', () => {
4646
expect(app).toBeTruthy();
4747
}));
4848

49-
it('should have title "Getting the DataTable instance"', waitForAsync(() => {
49+
it('should have title "Finding DataTable instance"', waitForAsync(() => {
5050
const app = fixture.debugElement.componentInstance as DtInstanceComponent;
51-
expect(app.pageTitle).toBe('Getting the DataTable instance');
51+
expect(app.pageTitle).toBe('Finding DataTable instance');
5252
}));
5353

5454
it('should retrieve Table instance', async () => {

demo/src/app/advanced/dt-instance.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DataTableDirective } from 'angular-datatables';
88
})
99
export class DtInstanceComponent implements OnInit {
1010

11-
pageTitle = 'Getting the DataTable instance';
11+
pageTitle = 'Finding DataTable instance';
1212
mdIntro = 'assets/docs/advanced/dt-instance/intro.md';
1313
mdHTML = 'assets/docs/advanced/dt-instance/source-html.md';
1414
mdTS = 'assets/docs/advanced/dt-instance/source-ts.md';

demo/src/app/advanced/load-dt-options-with-promise.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ describe('LoadDtOptionsWithPromiseComponent', () => {
4646
expect(app).toBeTruthy();
4747
}));
4848

49-
it('should have title "Load DataTables Options with Promise"', waitForAsync(() => {
49+
it('should have title "Load DT Options with Promise"', waitForAsync(() => {
5050
const app = fixture.debugElement.componentInstance as LoadDtOptionsWithPromiseComponent;
51-
expect(app.pageTitle).toBe('Load DataTables Options with Promise');
51+
expect(app.pageTitle).toBe('Load DT Options with Promise');
5252
}));
5353

5454
it('should render table from dtOptions as a Promise', async () => {

demo/src/app/advanced/load-dt-options-with-promise.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { HttpClient } from '@angular/common/http';
77
})
88
export class LoadDtOptionsWithPromiseComponent implements OnInit {
99

10-
pageTitle = 'Load DataTables Options with Promise';
10+
pageTitle = 'Load DT Options with Promise';
1111
mdIntro = 'assets/docs/advanced/load-dt-opt-with-promise/intro.md';
1212
mdHTML = 'assets/docs/advanced/load-dt-opt-with-promise/source-html.md';
1313
mdTS = 'assets/docs/advanced/load-dt-opt-with-promise/source-ts.md';

demo/src/app/advanced/multiple-tables.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
Display the DataTable instances in the console
55
</button>
66
</p>
7+
8+
<h5 class="header">Table 1</h5>
79
<table id="first-table" datatable [dtOptions]="dtOptions[0]" class="row-border hover"></table>
10+
<h5 class="header">Table 2</h5>
811
<table id="second-table" datatable [dtOptions]="dtOptions[1]" class="row-border hover"></table>
912

1013
</ng-template>

demo/src/app/advanced/multiple-tables.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ describe('MultipleTablesComponent', () => {
4646
expect(app).toBeTruthy();
4747
}));
4848

49-
it('should have title "Multiple DataTables in the same page"', waitForAsync(() => {
49+
it('should have title "Multiple tables in the same page"', waitForAsync(() => {
5050
const app = fixture.debugElement.componentInstance as MultipleTablesComponent;
51-
expect(app.pageTitle).toBe('Multiple DataTables in the same page');
51+
expect(app.pageTitle).toBe('Multiple tables in the same page');
5252
}));
5353

5454
it('should have two table instances in dtElements', async () => {

demo/src/app/advanced/multiple-tables.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { DataTableDirective } from 'angular-datatables';
77
})
88
export class MultipleTablesComponent implements OnInit {
99

10-
pageTitle = 'Multiple DataTables in the same page';
10+
pageTitle = 'Multiple tables in the same page';
1111
mdIntro = 'assets/docs/advanced/multiple-tables/intro.md';
1212
mdHTML = 'assets/docs/advanced/multiple-tables/source-html.md';
1313
mdTS = 'assets/docs/advanced/multiple-tables/source-ts.md';

demo/src/app/advanced/router-link.component.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<ng-template #preview>
2-
<table datatable [dtOptions]="dtOptions" class="row-border hover"></table>
2+
<table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger" class="row-border hover"></table>
33
</ng-template>
4+
5+
<ng-template #demoNg let-data="adtData" let-emitter="captureEvents">
6+
<app-demo-ng-template-ref [data]="data" actionText="View" (emitter)="emitter($event)"></app-demo-ng-template-ref>
7+
</ng-template>
8+
49
<app-base-demo [pageTitle]="pageTitle" [mdIntro]="mdIntro" [mdHTML]="mdHTML"
510
[mdTS]="mdTS" [mdTSHeading]="mdTSHeading" [mdTSHigh]="mdTSHigh" [mdTSHighHeading]="mdTSHighHeading"
611
[template]="preview">

0 commit comments

Comments
 (0)