I am currently developing an Ionic app and I was wondering if I could add an image gallery based on Bootstrap. I know Ionic and Bootstrap don't work really well together, but I was wondering if it is possible.
相关问题
- Plugin with id 'com.google.gms.google-services
- angularJS: ui-router equivalent to $location.searc
- How to add a “active” class to a carousel first el
- Separate AngularJS Controllers Into Separate Files
- How to pass form data from Ionic 3 to PHP file?
相关文章
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Make Bootstrap tab Active on the bases of URL link
- Ionic 4: Hardware Back Button Reloading Applicatio
- Rails: Twitter Bootstrap Buttons when visited get
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
I see 3 different ways to solve this.
If all you want is the carousel, you don't need to try to hack bootstrap into your app. The bootstrap plugin should be pretty independant. Just use the JS file seperately: https://github.com/twbs/bootstrap/blob/master/js/carousel.js Ofcourse, it won't work properly without the styling. You could try copying the LESS source of the carousel and re-style it yourself.
The bootstrap carousel isn't that unique in comparison to many other plugins. You might as well just be better off finding another one.
Do a search on http://bower.io or try this one: http://flexslider.woothemes.com/
Ionic framework uses Angular, which has a large community. Anything built in Angular should probably work in Ionic as well. If you google for "angular carousel" you'll find many options. This appears to be a popular one: http://vasyabigi.github.io/angular-slick/
Have you tried using this Ionic directive?
<ion-slide-box></ion-slide-box>
.Here's how I used it in my Project
With this yoiu don't need to use BootStrap Carousel on your ionic app.
Step 1:
Install bootstrap:
Get bootstrap
Step 2:
Edit package.json:
Step 3:
Create new file sass.config.js in home folder
Step 4:
Edit variables.scss
Step 5:
Add your bootstrap code:
Step 6:
Run ionic app
According to this article Ionic + Twitter’s Bootstrap CSS Framework - Again!, it will be a lot of effort using bootstrap. However I found this slider for you How to Create Elegant Slider Carousel in Ionic Framework.
I hope it helps you! Good luck! ;)