Closed tsirlucas closed 7 years ago
I've tried to change the slider template via provider and the html hasn't changed, so i went to ion-gallery.js to check what was happening and the loadModal function isn't getting the template from provider.
My provider config:
angular .module('test') .config(galleryConfig); function galleryConfig(ionGalleryConfigProvider) { ionGalleryConfigProvider.setGalleryConfig({ action_label: 'Close', template_slider: './components/photoWall/photoWallModal.view.html' }); }
The loadModal function on :
scope.loadModal = function(){ $ionicModal.fromTemplateUrl('slider.html', { scope: scope, animation: 'fade-in' }).then(function(modal) { _modal = modal; scope.openModal(); }); };
Is it right or am I doing something wrong? I've made the corrections by hacking the lib and the loadModal function went like that:
scope.loadModal = function(){ $ionicModal.fromTemplateUrl(ionGalleryConfig.template_slider || 'slider.html', { scope: scope, animation: 'fade-in' }).then(function(modal) { _modal = modal; scope.openModal(); }); };
It's kinda simple to fix if I'm right, so I'm stepping up to create a PR.
Oh, i just cloned your project and notice that it's already fixed on master branch. Last version on bower is not working right.
I've tried to change the slider template via provider and the html hasn't changed, so i went to ion-gallery.js to check what was happening and the loadModal function isn't getting the template from provider.
My provider config:
The loadModal function on :
Is it right or am I doing something wrong? I've made the corrections by hacking the lib and the loadModal function went like that:
It's kinda simple to fix if I'm right, so I'm stepping up to create a PR.