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

Commit 8ab3107

Browse files
committed
Add codelyzer #983
1 parent e13e627 commit 8ab3107

25 files changed

+72
-49
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'dt-instance-snippet',
4+
selector: 'app-dt-instance-snippet',
55
template: `
66
<div id="html" class="col s12 m9 l12">
77
<h4 class="header">HTML</h4>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h4 class="header">Preview</h4>
3333
</blockquote>
3434
<table datatable [dtOptions]="dtOptions" class="row-border hover"></table>
3535
</div>
36-
<dt-instance-snippet></dt-instance-snippet>
36+
<app-dt-instance-snippet></app-dt-instance-snippet>
3737
</div>
3838
</div>
3939
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
33
import { DataTableDirective } from 'angular-datatables';
44

55
@Component({
6-
selector: 'dt-instance',
6+
selector: 'app-dt-instance',
77
templateUrl: 'dt-instance.component.html'
88
})
99
export class DtInstanceComponent implements OnInit {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'load-dt-options-with-promise-snippet',
4+
selector: 'app-load-dt-options-with-promise-snippet',
55
template: `
66
<div id="html" class="col s12 m9 l12">
77
<h4 class="header">HTML</h4>
@@ -78,5 +78,6 @@ export class LoadDtOptionsWithPromiseComponent implements OnInit {
7878
}
7979
]
8080
}</code>
81-
</pre>`
81+
</pre>
82+
`;
8283
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1 class="header center-on-small-only">Load DataTables options with promise</h1
2626
<h4 class="header">Preview</h4>
2727
<table datatable [dtOptions]="dtOptions" class="row-border hover"></table>
2828
</div>
29-
<load-dt-options-with-promise-snippet></load-dt-options-with-promise-snippet>
29+
<app-load-dt-options-with-promise-snippet></app-load-dt-options-with-promise-snippet>
3030
</div>
3131
</div>
3232
</div>

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
@@ -4,7 +4,7 @@ import { Http } from '@angular/http';
44
import 'rxjs/add/operator/toPromise';
55

66
@Component({
7-
selector: 'load-dt-options-with-promise',
7+
selector: 'app-load-dt-options-with-promise',
88
templateUrl: 'load-dt-options-with-promise.component.html'
99
})
1010
export class LoadDtOptionsWithPromiseComponent implements OnInit {

demo/src/app/advanced/row-click-event-snippet.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'row-click-event-snippet',
4+
selector: 'app-row-click-event-snippet',
55
template: `
66
<div id="html" class="col s12 m9 l12">
77
<h4 class="header">HTML</h4>

demo/src/app/advanced/row-click-event.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h4 class="header">Preview</h4>
2828
<br />
2929
<table datatable [dtOptions]="dtOptions" class="row-border hover"></table>
3030
</div>
31-
<row-click-event-snippet></row-click-event-snippet>
31+
<ap-row-click-event-snippet></app-row-click-event-snippet>
3232
</div>
3333
</div>
3434
</div>

demo/src/app/advanced/row-click-event.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { Component, NgZone, OnInit } from '@angular/core';
33
declare var $: any;
44

55
@Component({
6-
selector: 'row-click-event',
6+
selector: 'app-row-click-event',
77
templateUrl: 'row-click-event.component.html'
88
})
99
export class RowClickEventComponent implements OnInit {
10-
message: string = '';
10+
message = '';
1111
dtOptions: any = {};
1212

1313
constructor(private zone: NgZone) { }
@@ -30,7 +30,7 @@ export class RowClickEventComponent implements OnInit {
3030
data: 'lastName'
3131
}],
3232
rowCallback: (nRow: number, aData: any, iDisplayIndex: number, iDisplayIndexFull: number) => {
33-
let self = this;
33+
const self = this;
3434
// Unbind first in order to avoid any duplicate handler
3535
// (see https://github.com/l-lin/angular-datatables/issues/87)
3636
$('td', nRow).unbind('click');

demo/src/app/app.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ describe('AppComponent', () => {
1313
});
1414

1515
it('should create the app', async(() => {
16-
let fixture = TestBed.createComponent(AppComponent);
17-
let app = fixture.debugElement.componentInstance;
16+
const fixture = TestBed.createComponent(AppComponent);
17+
const app = fixture.debugElement.componentInstance;
1818
expect(app).toBeTruthy();
1919
}));
2020

2121
it(`should have as title 'app works!'`, async(() => {
22-
let fixture = TestBed.createComponent(AppComponent);
23-
let app = fixture.debugElement.componentInstance;
22+
const fixture = TestBed.createComponent(AppComponent);
23+
const app = fixture.debugElement.componentInstance;
2424
expect(app.title).toEqual('app works!');
2525
}));
2626

2727
it('should render title in a h1 tag', async(() => {
28-
let fixture = TestBed.createComponent(AppComponent);
28+
const fixture = TestBed.createComponent(AppComponent);
2929
fixture.detectChanges();
30-
let compiled = fixture.debugElement.nativeElement;
30+
const compiled = fixture.debugElement.nativeElement;
3131
expect(compiled.querySelector('h1').textContent).toContain('app works!');
3232
}));
3333
});

0 commit comments

Comments
 (0)