Gallery Type View


#1

Hi,

This is a design question.

In my app I am getting many pictures using the Image Picker plugin. My requirement is to display these images as a gallery in multiple pages in my app.

I have coded a gallery display which accepts max of two photos per row and is able to dynamically handle the different image counts.

My question is this. Since I need this piece of code at multiple locations and since I am also inherently a lazy developer. :wink: I am thinking of doing the following and I would like to know if it will work.

I am thinking of making this code (html and ts) into a template and access this custom template from different pages.

What should I generate this as 1. A Provider or 2. A Component.

Can some one point me to relevant examples.

Cheers,
SD.