this is my ngOnInit
function
instance.input = document.getElementById(\'google_places_ac\');
autocomplete = new google.maps.places.Autocomp
you can check this angular2 official docs for setting up the attributes,
cheatsheet - https://angular.io/docs/ts/latest/cheatsheet.html
Update
import { Component, ChangeDetectorRef } from 'angular2/core';
constructor(private cdr:ChangeDetectorRef) {
}
public setValue(a,b,c) {
this.coutnry = a;
this.state = b;
this.city = c;
this.sharedService.country = this.coutnry;
this.sharedService.city = this.city;
this.sharedService.state = this.state;
console.log(a, b, c);
this.cdr.detectChanges();
}