ksachdeva / angular-swiper

Angular directive for nolimits4web/Swiper
Apache License 2.0
197 stars 94 forks source link

allow attribute to set class of navigation buttons #35

Open edamon opened 8 years ago

edamon commented 8 years ago

I'd like an attribute so I can set the nav arrows to "swiper-button-white". I'll try to make a pull request soon.

brh55 commented 8 years ago

Sounds like an interesting idea, but shouldn't this be managed through css. External stylesheets are more performance effective then inline styles.

edamon commented 8 years ago

"swiper-button-white" is an exisitng css class in the swiper.css https://github.com/nolimits4web/Swiper/blob/master/dist/css/swiper.css.

WillsB3 commented 7 years ago

+1 for this, mostly because I tried to specify a custom (existing element) using the override-parameters attribute like this:

<ks-swiper-container class="my-slider" pagination-is-active="true" show-nav-buttons="true" override-parameters="{'nextButton': 'my-slider__button--next', 'prevButton': 'my-slider__button--prev'}">
override-parameters="{'nextButton': 'my-slider__button--next', 'prevButton': 'my-slider__button--prev'}"

... Slides ...

</ks-swiper-container>

However this didn't work, it seems if you try and override the next and prev Button selectors the next and previous buttons no longer work at all.

If we could specify a custom class via an attribute we wouldn't need to use override-parameters to specify a custom element (maybe this is just hacking around the actual issue though...)