Skip to content

Commit 990cd68

Browse files
author
borysn
committed
good form
1 parent 21ee209 commit 990cd68

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

frontend/src/app/calendar/calendar.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export class CalendarComponent {
1212

1313
// date picker
1414
public date:Date = new Date();
15-
private minDate:Date = null;
16-
private events:Array<any>;
17-
private tomorrow:Date;
18-
private afterTomorrow:Date;
19-
private formats:Array<string> = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
20-
private format = this.formats[0];
21-
private dateOptions:any = {
15+
private _minDate:Date = null;
16+
private _events:Array<any>;
17+
private _tomorrow:Date;
18+
private _afterTomorrow:Date;
19+
private _formats:Array<string> = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
20+
private _format = this._formats[0];
21+
private _dateOptions:any = {
2222
formatYear: 'YY',
2323
startingDay: 1
2424
};

frontend/src/app/hello/hello.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ interface MessageJson {
1818
export class HelloComponent {
1919

2020
// vars
21-
private jsonResponse: string;
22-
private messages: Array<MessageJson>;
23-
private subscription;
21+
public jsonResponse: string;
22+
public messages: Array<MessageJson>;
23+
private _subscription;
2424

2525
// constructor
26-
constructor(private helloService: HelloService) {}
26+
constructor(private _helloService: HelloService) {}
2727

2828
// on-init
2929
ngOnInit() {
30-
// save subscription
31-
this.subscription = this.helloService.getTest()
30+
// save _subscription
31+
this._subscription = this._helloService.getTest()
3232
.subscribe(
3333
(data) => {
3434
this.jsonResponse = JSON.stringify(data);
@@ -42,6 +42,6 @@ export class HelloComponent {
4242
// on-destroy
4343
ngOnDestroy() {
4444
// unsubscribe
45-
this.subscription.unsubscribe();
45+
this._subscription.unsubscribe();
4646
}
4747
}

frontend/src/app/hello/hello.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import 'rxjs/add/operator/map';
55
@Injectable()
66
export class HelloService {
77

8-
constructor(@Inject(Http) private http: Http) {}
8+
constructor(private _http: Http) {}
99

1010
getTest() {
11-
return this.http.get('http://localhost:8080/test/get/json')
11+
return this._http.get('http://localhost:8080/test/get/json')
1212
.map((res:Response) => res.json());
1313
}
1414
}

frontend/src/app/home/home.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ import { ROUTER_DIRECTIVES } from '@angular/router';
77
styleUrls: ['home.scss'],
88
directives: [ROUTER_DIRECTIVES]
99
})
10-
export class HomeComponent {
11-
constructor() {}
12-
}
10+
export class HomeComponent {}

0 commit comments

Comments
 (0)