Skip to content

Commit

Permalink
fix(angular): pagination true should work
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Apr 28, 2021
1 parent 7fc4f2a commit 434a19c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions playground/angular/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<img src="https://swiperjs.com/demos/images/nature-3.jpg" />
</ng-template>
</swiper>

<h3>Custom pagination</h3>
<swiper
#swiperRef
[navigation]="navigation"
Expand Down
9 changes: 5 additions & 4 deletions src/angular/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ export function isObject(o) {
}

export function isShowEl(val, obj, el) {
return !(
coerceBooleanProperty(val) !== true ||
(obj &&
return (
(coerceBooleanProperty(val) === true && obj && !obj.el) ||
!(
typeof obj !== 'boolean' &&
obj.el !== el?.nativeElement &&
(typeof obj.el !== 'string' || typeof obj.el !== 'object'))
(typeof obj.el === 'string' || typeof obj.el === 'object')
)
);
}

Expand Down

0 comments on commit 434a19c

Please sign in to comment.