Я пытаюсь получить данные json с помощью Angular $ http.get. Но я получаю неопределенное значение.Угловой - получение данных JSON как неопределенных
Мой Json Файл ниже
[
{
"BannerText": "The First Mobile SSP. Truly Optimized for Outstream Video",
"IntroText": "Chololate SSO provides necessary infrastructure for app monetization thgough video ads. More than 150 million people worldwide see a Chocolage SSP ad each month.",
"SolutionHeaderText": "Solution For Publishers",
"SolutionValueText": "Unlock the true potential of your mobile inventory with industry leading eCPMs & Fill Rates"
}
]
Script File
.controller('HomeCtrl', function ($scope, $http) {
alert('Called');
$http.get("data/homeData.json")
.success(function(data) {
$scope.details = data;
alert($scope.details.BannerText);
});
});
HTML
<div ng-controller="HomeCtrl">
<div class="banner-section">
<div class="banner-text text-center">
<p>{{ details.BannerText }}</p>
</div>
</div>
</div>