How to make dynamic views with ionic angularjs


#1

I’m using Ionic framework for my new application.

I have an issue, I want to know how it would be possible to insert views dynimacally.

I make a request to the server requesting news, the response in in JSON which look like :

{
"title":"news 1",
"image":"http://www.server.com/news_image1.png",
"description":"news_description"
},
{
"title":"news 2",
"image":"http://www.server.com/news_image2.png",
"description":"news_description"
},
{
"title":"news 3",
"image":"http://www.server.com/news_image3.png",
"description":"news_description"
}

I want to insert data dynmaically to the ion-view and be able to swipe between the news like the image below :

So if you just have an idea how can that be possible !


#2

Hi,
Why don’t you try with ion-slide-box?
Here is one example that loads images only when slide is viewed:


#3

Thank you so much ! that helped me a lot, I started making something similar