Skip to content

Commit 311d4fb

Browse files
committed
Add anotations
1 parent 405e223 commit 311d4fb

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

projects/weather-demo/src/app/app.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
<button (clicked)="onClose()">Close</button>
1313
</view>
1414
</view>
15-
1615
</view>
1716
</window>

projects/weather-demo/src/app/app.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export class AppComponent implements OnInit {
2929

3030
constructor() {}
3131

32+
/**
33+
* Init component and configure window widget
34+
*/
3235
ngOnInit() {
3336
const win = this.window.nativeElement.parent;
3437

@@ -47,7 +50,14 @@ export class AppComponent implements OnInit {
4750
win.show();
4851
}
4952

53+
/**
54+
* Refresh weather info
55+
*/
5056
onRefresh(): void {}
57+
58+
/**
59+
* Close applicatiion
60+
*/
5161
onClose(): void {
5262
QApplication.instance().quit();
5363
}

projects/weather-demo/src/app/app.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { PlacedateComponent } from './placedate/placedate.component';
1010
@NgModule({
1111
declarations: [AppComponent, SummaryComponent, TemeratureComponent, PlacedateComponent],
1212
imports: [NodeguiLibModule, HttpClientModule],
13-
providers: [],
1413
bootstrap: [AppComponent],
1514
schemas: [NO_ERRORS_SCHEMA]
1615
})

projects/weather-demo/src/app/placedate/placedate.component.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,25 @@ import { dateFormatter } from '../utils/helpers';
77
styleUrls: ['./placedate.component.scss'],
88
encapsulation: ViewEncapsulation.None
99
})
10-
export class PlacedateComponent implements OnInit {
10+
export class PlacedateComponent {
1111
@Input() place: string;
1212
@Input() set date(value: Date) {
1313
this.fullDate = dateFormatter(value);
1414
}
1515

1616
public fullDate: string;
1717

18-
public placeStyle = `
18+
public readonly placeStyle = `
1919
flex: 1;
2020
font-size: 20px;
2121
qproperty-alignment: 'AlignCenter';
2222
color: white;
2323
`;
24-
public dateStyle = `
24+
25+
public readonly dateStyle = `
2526
flex: 1;
2627
font-size: 12px;
2728
qproperty-alignment: 'AlignCenter';
2829
color: white;
2930
`;
30-
constructor() {}
31-
32-
ngOnInit() {}
3331
}

projects/weather-demo/src/app/summary/summary.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ import {
1313
styleUrls: ['./summary.component.scss'],
1414
encapsulation: ViewEncapsulation.None
1515
})
16-
export class SummaryComponent implements OnInit, OnChanges {
16+
export class SummaryComponent implements OnChanges {
1717
@Input() title: string;
1818
@Input() description: string;
1919

2020
public summary;
2121

22-
constructor() {}
23-
24-
ngOnInit() {}
25-
2622
ngOnChanges(): void {
2723
this.summary = `<b>${this.title}<b> : <i>${this.description}</i>`;
2824
}

projects/weather-demo/src/app/temerature/temerature.component.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,21 @@ import { Component, OnInit, Input, ViewEncapsulation } from '@angular/core';
66
styleUrls: ['./temerature.component.scss'],
77
encapsulation: ViewEncapsulation.None
88
})
9-
export class TemeratureComponent implements OnInit {
9+
export class TemeratureComponent {
1010
@Input() now: string;
1111
@Input() min: string;
1212
@Input() max: string;
1313

14-
public sup = `<sup>o</sup>`;
15-
public currentTempStyle = `
14+
public readonly sup = `<sup>o</sup>`;
15+
public readonly currentTempStyle = `
1616
font-size: 20px;
1717
width: 150px;
1818
qproperty-alignment: AlignCenter;
1919
color: white;
2020
`;
21-
public smallInfo = `
21+
public readonly smallInfo = `
2222
width: 150px;
2323
color: white;
2424
qproperty-alignment: AlignCenter;
2525
`;
26-
27-
constructor() {}
28-
29-
ngOnInit() {}
3026
}

0 commit comments

Comments
 (0)