I'm using controller as-syntax and met a ridicilous circumstance
this.showAddressDetail = false;
this.searchPlace = function() {
GoogleService.searchPlace($('#address')[0], function(place) {
this.showAddressDetail = true;
});
};
whenever the callback of GoogleService.searchPlace be triggered. I want to assign true to this.showAddressDetail. But in this case this is the callback function.
So how to assign value to this.showAddressDetail?