.subscribe(data=> {
this.timezones = data;
}
.is data => the same as used in the constructor (private: data) what is the arrow and what does it do ?
export class Xx implements OnInit {
timezones: Object;
constructor(private api: ApiService, private data: TimezoneService) { }
registered: boolean = false;
ngOnInit() {
this.data.getTimeZone().subscribe(data=> {
this.timezones = data;
});
}
}