I currently have a route like:
/images
that renders a grid of images. When a user clicks on an image I transition to a nested route:
/images/:image_id
to display a large versions of that image.
I want to display the large image with the grid images bordering it and smaller than they are displayed in the grid view, but I'm not sure what a good approach in ember would be.
The grid view would be like:
* * * * * *
* * * * * *
* * * * * *
And the view when one is clicked on would be something like:
. . . . .
. _______ .
. | | .
. | | .
. |_______| .
. . . . .
* = medium thumbnails
. = small thumbnails
box = large image
I thought about creating an ImagesController action to handle when an image in the grid is selected. Then an if condition in the images handlebars template that changes the images layout and has an outlet for the large image. Something like:
<script type="text/x-handlebars" data-template-name='images'>
{{#if isGridView}}
Draw each image in a grid
{{else}}
Draw small images
{{outlet}} <-- for large image
{{/if}}
</script>
I also thought of making the images a dependency of the single image as described here and then using the images data from the image handlebars template to create the layout by accessing controllers.images.
Would Views be of any use for this? Thanks for the help.