How is it possible to invoke a function when HTML page is loaded? Right now, the function call is made manually by pressing the button, like:
<p>
{{address}}
</p>
<button class="btn btn-primary checkout" ng-click="getAddress()">
<i class="fa"> Get address</i>
</button>
It is also possible to call function using {{getAddress()}}. But, as expected it causes infinite loop.
getAddress() makes call to a backend, gets data and populates address on $scope ($scope.address)
It would be nice to load it automatically and get rid off the button.