Skip to content

Commit 434a19c

Browse files
committed
fix(angular): pagination true should work
1 parent 7fc4f2a commit 434a19c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

playground/angular/src/app/app.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
<img src="https://swiperjs.com/demos/images/nature-3.jpg" />
4545
</ng-template>
4646
</swiper>
47+
48+
<h3>Custom pagination</h3>
4749
<swiper
4850
#swiperRef
4951
[navigation]="navigation"

src/angular/src/utils/utils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ export function isObject(o) {
88
}
99

1010
export function isShowEl(val, obj, el) {
11-
return !(
12-
coerceBooleanProperty(val) !== true ||
13-
(obj &&
11+
return (
12+
(coerceBooleanProperty(val) === true && obj && !obj.el) ||
13+
!(
1414
typeof obj !== 'boolean' &&
1515
obj.el !== el?.nativeElement &&
16-
(typeof obj.el !== 'string' || typeof obj.el !== 'object'))
16+
(typeof obj.el === 'string' || typeof obj.el === 'object')
17+
)
1718
);
1819
}
1920

0 commit comments

Comments
 (0)