DEMO: http://dsh-s1.info/DigitalPoint/netflix-popup/
- Takes 1 parameter [movieID: int].
- Data is processed and encoded as json.
movies-list.html movie-card.html netflix-popup.html core-ajax
- Passes movieID to movie-card.html
- Passes movieID to netflix-popup.html
- Takes movieID from movie-card.html
- Uses core-ajax element to fetch the information.
- There are 2 important parameters for core-ajax.
url: path to the php file along with the movieID
response: output received from the php script.
The response is a json array. So we need to put it in a loop or access via an index. I just used a loop.
i.e.
test from c9.io