I am able to successfully bind my JSON to my form, however I have a JQuery function that should only be called once the data is fully loaded and complete. Currently it seems to call the jquery function immediately before the JSON has had time to be binded...
I temporarily used a timeout to call it after 200 milliseconds which worked but isnt the correct solution.
I don't seem to see a feature such as ajax Complete and have investigated Then and Promise but with no luck.
Having looked at Stackoverflow examples for Promise I adjusted my angular as follows:
var app = angular.module('businessProfile', []);
app.controller("dataCtrl", ['$scope','$http', function($scope, $http)
{
var promise = $http.get('data.json').then(function(data){
$scope.businessData = data.data.Data;
return data.data.Data
});
promise.then(function(data) {
// Function to call after JSON is ready
$(".gllpLatlonPicker").each(function() {
$(document).gMapsLatLonPicker().init( $(this) );
});
});
}]
);