Closed chakraborty-slx closed 6 years ago
The simple way is to just use:
$http.get('my_file.json').then(function (res) {
$scope.model = JSON.parse(res.data);
});
@AChakraborty1982 please comment if you want to re-open or do not feel the question has been answered sufficiently.
Please see this plunker https://plnkr.co/edit/Kax2uyNC0XdnSZCQWBLo
I am trying to set the $scope.model after the bootstrap manually, as this is a usecase in which the model is read from an external file which i m emulating for the example.
Please suggest any link or post by which i can update the model with my input json .