Я должен добавить список как категорию, это не работает должным образом. Я добавил файл PlaylistsCtrl.js, playlists.html и файл php json ниже этого вопроса.
PlaylistsCtrl.js
.controller('PlaylistsCtrl', function($scope,$http) { var vm = this; vm.playlists = {}; $http.get("http://localhost/youtubewebservice/shop-categorylist-product.php") .success(function(response) { vm.playlists = response.records; }); })
playlists.html
<ion-view view-title="playlists"> <ion-content> <ion-list> <ion-item ng-repeat="playlist in playlists" href="#/app/playlists/{{playlist.id}}"> {{playlist.name}} </ion-item> </ion-list> </ion-content> </ion-view>
магазин-categorylist-product.php
{ "category": [{ "term_id": "10", "name": "Arden Grange", "slug": "arden-grange", "products": [{ "ID": "47", "post_title": "Arden Grange, Premium", "post_date": "2015-10-20 16:13:04", "post_author": "5" }, { "ID": "50", "post_title": "Arden Grange Puppy\/Junior Large Breed", "post_date": "2015-10-21 04:56:23", "post_author": "5" }, { "ID": "53", "post_title": "Arden Grange Weaning\/Puppy", "post_date": "2015-10-22 12:52:35", "post_author": "5" }] }, { "term_id": "12", "name": "Jewellery", "slug": "jewellery", "products": [{ "ID": "59", "post_title": "Sterling silver Amethyst studs", "post_date": "2015-11-30 09:37:05", "post_author": "8" }, { "ID": "105", "post_title": "London Blue topaz 7 carat AAA quality", "post_date": "2015-12-01 05:09:32", "post_author": "8" }, { "ID": "134", "post_title": "7 Carat Natural Purple Amethyst AAA quality", "post_date": "2015-12-01 05:09:31", "post_author": "8" }, { "ID": "136", "post_title": "10 carat natural Smoky Quartz AAA quality", "post_date": "2015-12-01 05:09:31", "post_author": "8" }] }] }