mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(slides): fix rtl support.
- fix rtl functionalities in slides when attribute (dir=“rtl”) added to ion-slides. - e2e test added: ‘slides/test/rtl’
This commit is contained in:

committed by
Manu Mtz.-Almeida

parent
bee75f7d00
commit
e90d692b1f
@ -139,7 +139,7 @@ import { ViewController } from '../../navigation/view-controller';
|
||||
@Component({
|
||||
selector: 'ion-slides',
|
||||
template:
|
||||
'<div class="swiper-container">' +
|
||||
'<div class="swiper-container" [attr.dir]="_rtl? \'rtl\' : null">' +
|
||||
'<div class="swiper-wrapper">' +
|
||||
'<ng-content></ng-content>' +
|
||||
'</div>' +
|
||||
@ -249,6 +249,14 @@ export class Slides extends Ion {
|
||||
}
|
||||
private _pager = false;
|
||||
|
||||
/**
|
||||
* @input {string} If dir attribute is equal to rtl, set interal _rtl to true;
|
||||
*/
|
||||
@Input()
|
||||
set dir(val: string) {
|
||||
this._rtl = (val.toLowerCase() === 'rtl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {string} Type of pagination. Possible values are:
|
||||
* `bullets`, `fraction`, `progress`. Default: `bullets`.
|
||||
|
Reference in New Issue
Block a user