I have a simple page with an input and two buttons. These buttons each have a click function: getLocation() and test().
The input has an ngModel of latLng
When I run getLocation() I set the this.latLng variable to the coordinates returned. I do a console.log and see that it’s working correctly.
But then I run the test() function, which logs the exact same variable (this.latLng) and it’s null again!
What am I missing?