I am looking to implement a feature where users can search for locations using the Google Places API. When they click on a specific location, I want to update a parameter value in the scope.
Here is a visual representation:
The Google integration works smoothly. However, when the user clicks on "New South Wales", this is what happens after {{ table.newItem }}
is evaluated:
Unfortunately, the value in my scope does not get updated upon the user's click event.
I am unsure about how to utilize $watch()
or $apply()
. Would any of these functions be helpful in this scenario?
Additionally, I currently have this code in a link function to access the input box on a click event. Is there a better place to put this code?