value not updating in the view after data update , angular2 and typescript

前端 未结 2 1291
情书的邮戳
情书的邮戳 2021-01-23 23:04

this is my ngOnInit function

 instance.input = document.getElementById(\'google_places_ac\');
        autocomplete = new google.maps.places.Autocomp         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-23 23:33

    You should use property binding by wrapping attribute inside []

    
    

    Additional thing is, you made typo while writing country like you wrotecoutnry instead in two places.

    this.sharedService.country = this.coutnry; //in constructor
    
    attr.country="{{coutnry}}" //second place
    

提交回复
热议问题