html - Slide pages in ionic (images from json request) -
html - Slide pages in ionic (images from json request) -
i have json consists of image,title , description.(json of news) want create view shows image,title , description in page. should able slide page view next news item. i'm using angularjs , ionic framework this.
the way tried shows images in same page
mycode
<ion-view title="news" ng-controller="newsctrl"> <ion-content class="has-header" scroll="true" padding="true"> <ion-list> <ion-item ng-repeat="newss in news"> <ion-slide> <img ng-src= http://@@@@@@@@/{{newss.image}}> <b><h4 class="list-group-item-heading">{{newss.title}}</h4></b><br> <h5 class="list-group-item-text">{{newss.description}}</h5> </ion-slide> </ion-item> </ion-list> </ion-content> </ion-view>
how can this? ex: json looks this
{ news: [ { id: "1", title: "dgdgdgdgdg", image: "uploads/news/******_logo.jpg", status: "yes" }, { id: "3", title: "dgdgdgdgdgdg", description: "solution dgdgdgl", image: "uploads/news/2013_batman_arkham_origins-1920x1080.jpg", status: "yes" }, ] }
use ion-slide-box
<ion-slide-box> <ion-slide ng-repeat="n in news"> <img ng-src="{{n.image}}"> </ion-slide> </ion-slide-box>
reference:
ion-slide-box
html json angularjs ionic-framework
Comments
Post a Comment