1

I am trying to build a list-view using angularjs.

  1. Display list of popular movies [10 title per page] URL : http://api.themoviedb.org/3/discover/movie?sort_by=popularity.desc
  2. Display details of a movie on click data from previous GET could be used. Fields should be mandatory : overview, release_date, vote_average

Any example code is there please share it to me. It will be helpful for me

1
  • Are you building a jQuery page or an Angular page? Commented Feb 5, 2016 at 16:32

1 Answer 1

2

Your question is a little bit vague but I can provide some information about ng-repeat.

In your controller, you could have an array like:

$scope.movies = [{title: "Avatar"}, {title: "Spectre"}, {title: "Teletubbies"}]

Then, in your HTML you could create a list like this:

<ul>
    <li ng-repeat="movies in movies">{{movie.title}}</li>
</ul>

In the list item you can later add the ng-click attribute, the second part of your question. First, make sure to populate the list using the api!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.