sorundur benim ngOnInit
fonksiyontypescript mantık sorunu ben aşağıda paylaşılan hizmeti kullanarak tüm bileşenlere geçmek konum değerini almak için bir işlevi oluşturmak çalışıyorum
this.input = document.getElementById('google_places_ac');
var autocomplete = new google.maps.places.Autocomplete(this.input, { types: ['(cities)']});
google.maps.event.addListener(autocomplete, 'place_changed', function() {
var place=autocomplete.getPlace();
this.setValue(place.address_components[3].long_name, place.address_components[2].long_name, place.address_components[1].long_name);
});
olduğunu paylaştığım hizmetle veya bu değişkenle herhangi bir değişkenle paylaştığımız this.setvalue işlevini, bu "javascript" javascriptiyle tanımadığını. ve bu işlevi kurucumla çalışmaya bile başlayamıyorum, getElmentById'de hata atar. place_changed
İçinde
var örneğini = Bu; çalışıyor, ben herhangi bir hata alamıyorum ama görünümde güncelleme değil, bunun için yeni bir soru oluşturmalı mıyım yoksa bu durum bilgiliğim ile netleşsin mi? – Ironsun
merhaba bana yardım edebilecek yeni bir soru sordum http://stackoverflow.com/questions/36387480/value-not-updating-in-the-view-after-data-update-angular2-and -typescript – Ironsun