In my Angular controller code, everything is functioning properly except for the $scope.Product
. I am unable to access the array of product details. Here is the relevant code snippet:
.controller('aboutCtrl', function ($scope, aboutService) {
var promise = aboutService.getAbout();
promise.then(function (rcdata) {
$scope.about = rcdata.data.about;
$scope.products = rcdata.data.products;
$scope.mobileProduct = rcdata.data.mobileProduct;
$scope.clients = rcdata.data.clients;
$scope.anytime = rcdata.data.anytime;
$scope.lobProduct = rcdata.data.lobProduct;
$scope.Product = rcdata.data.lobProduct.projectsdetails;
});
})
<section class="product-detail padding">
<div class="container">
<div class="row">
<div class="col-md-6" data-ng-repeat="detail in Product">
<div class="prdct-d">
<img class="img-responsive" src="<?php echo $img; ?>Computer/{{detail.mockup}}">
<p>
{{detail.description}}
</p>
</div>
</div>
</div>
</div>
</section>
Below is the provided JSON file for reference:
{
"products": [
{
"icon": "flaticon-computer",
"title": "Line Of Business",
"description": "Sample description."
},
... additional product entries ...
],
"about": [
{
"icon":"1-sales.png",
"title":"Sales",
"description": "Another sample description."
},
... additional about entries ...
],
"and other sections as per the original text..."
}