Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
angular-paginator
Advanced tools
Pagination for Angular applications
edit at stackblitz | demo on stackblitz
Install via Package managers such as npm or yarn
npm install angular-paginator --save
# or
yarn add angular-paginator
Import angular-paginator
module
import { AngularPaginatorModule } from 'angular-paginator';
@NgModule({
imports: [AngularPaginatorModule],
})
export class AppModule {}
Then in HTML
<div *ngFor="let item of array | angularPaginator: { currentPage: currentPage }; let i = index">
{{(currentPage - 1) * itemsPerPage + i +1}}. {{item}}
</div>
<angular-paginator (pageChange)="currentPage = $event"></angular-paginator>
angularPaginator pipe accepts
{
id: 'ANGULAR_PAGINATOR_DEFAULT',
itemsPerPage: 10,
currentPage: currentPage
}
<angular-paginator
id="ANGULAR_PAGINATOR_DEFAULT"
[maxSize]="5"
[rotate]="true"
[boundaryLinkNumbers]="false"
[forceEllipses]="false"
(pageChange)="currentPage = $event"
#paginator="angularPaginator"
>
</angular-paginator>
You can get access to the pagination instance(directive's api) using #paginator="angularPaginator"
. The following are the methods/properties available via the API
interface Page {
number: number;
text: string;
active: boolean;
}
currentPage - 1
)currentPage + 1
)FAQs
Pagination for Angular Applications
The npm package angular-paginator receives a total of 326 weekly downloads. As such, angular-paginator popularity was classified as not popular.
We found that angular-paginator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.