Closed synec closed 8 years ago
Looks good. Will this mess up with angular template cache if the templates are served differently ? I will have a quick round of testing later before merging.
Did you find any problems? Works fine for me! No problems with template cache so far.
I did a small set of tests and no issue at all. Will be merging this 🚢
Hi Guys, I'm trying to add a custom button but not having much luck. If I edit the default slider.html, the changes are not reflected in my app. If I change the template_slider config to a different slider file, it does not work. Appreciate any help as would love to use this plug-in but really need get a custom button on the slider. cheers
If you do change the template_slider, you have to rebuild the .min files with gulp. As for this PR, you just need to pass down to the props the template, as explained in the Readme. Any errors in the console ?
Thanks Pedro.
On a bit of a learning curve with directives. I have been able to add a button to the slider html.
You need to include the relative path to get this working. For me, it's like the below:
// values for ion gallery
ionGalleryConfigProvider.setGalleryConfig({
action_label: 'Close',
//template_gallery: 'gallery.html',
//template_slider: 'slider.html',
template_gallery: '../../assets/lib/ion-gallery/src/templates/tGallery.html',
template_slider: '../../assets/lib/ion-gallery/src/templates/tSlider.html',
toggle: false,
row_size: 3,
fixed_row_size: true
});
Example below of adding a button to the end of the slider. I'm having problem getting the padding working on right hand side buts its a start:
This kinda leads me to the next thing, does anyone have example of injecting scope and adding custom function inside this directive. I take any changes to the js files require the .min file to be rebuilt with gulp?
Hi! I've moved the urls for gallery and silder template into
ionGalleryConfig
to allow use of custom templates.Hope you like it.