Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to select a item of an array and show more info about it

$
0
0

@LucasViegas wrote:

Hey! I'm new to Ionic and I'm having two small problems that I believe that should be easy to solve.
I'm creating a small movie app and I've already created a array with 3 movies and all their info.

Here's the array of films created inside "watched page".

.controller('watchedCtrl', ['$scope', '$stateParams',

function ($scope, $stateParams) {
var movieslocal = [

{name:'Jurassic World',
descricao: 'Os donos de um parque temático de dinaussauros tentaram atrair turistas com uma emocionante nova exposição, mas um gigante mortífero foge e aterroriza toda a ilha.',
director:'Colin Trevorrow',
cast: 'Chris Pratt, Bryce Dallas',
genres: 'Action',
runtime: '2h17min',
rating: 'M/12',
release:'2015',
favorite: false,
watched: false},

{name:'Get Out',
director:'Colin Trevorrow',
cast: 'Chris Pratt, Bryce Dallas',
genres: 'Action',
runtime: '2h17min',
rating: 'M/12',
release:'2015',
favorite: false,
watched: false},

{name:'Guardians of the Galaxy 2',
director:'Colin Trevorrow',
cast: 'Chris Pratt, Bryce Dallas',
genres: 'Action',
runtime: '2h17min',
rating: 'M/12',
release:'2015',
favorite: false,
watched: false},

];

$scope.movies = movieslocal;

}])

and the list is shown in watched page like this:

The watched list only shows a list of the movies of that array.

My problem is how I can select a movie of the watched list and open a detail page of the movie with info in the array that I made.

Here's how it looks the detail default page:

and also the code of detail default page: ( I did tried to use ng-repeat but it repeats 3 times the info because there are 3 movies in my array list)

Thank you so much!!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>