To achieve this functionality, consider creating a custom directive...
Include the following CSS in your styles.css file:
.nav-wrapper {
position: relative;
overflow: hidden;
padding: 0;
}
.nav-wrapper > ul {
display: flex;
}
.nav-wrapper--scrollable {
padding: 0 32px;
}
.nav-arrow {
position: absolute;
display: none;
top: 0;
bottom: 0;
z-index: 1;
border: 1px solid #2399e5;
background: #2399e5;
font: 14px/1 FontAwesome;
color: #fff;
cursor: pointer;
}
.nav-wrapper--scrollable .nav-arrow {
display: block;
}
.nav-arrow:hover {
border: 1px solid #1f89ce;
background: #1f89ce;
}
.nav-arrow:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.nav-arrow--left {
left: 0;
}
.nav-arrow--left:before {
content: "\f053";
}
.nav-arrow--right {
right: 0;
}
.nav-arrow--right:before {
content: "\f054";
}
.nav-arrow--disabled,
.nav-arrow--disabled:hover {
background: #ccc;
border: #ddd;
cursor: default;
}
Implementation of the directive:
// Angular Directive Code
// Source: [link here]
To use the directive in your HTML:
<p-tabView appTabScroller>
<p-tabPanel [header]="item.content" *ngFor="let item of items; let i = index" [selected]="i == 0">
</p-tabPanel>
</p-tabView>
Check out the Demo
Source: Link to Source