ng-readmore
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

ReadMore

This library was generated with Angular CLI version 16.2.12 and Node Version is v18.10.0.

Intro

This is an angular module that will help reduce text to smaller version and will show read more/less option after that

Installation

npm install ng-readmore --save

Usage

import { ReadMoreModule } from 'ng-readmore';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    ReadMoreModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.html

<app-read-more [text]="text" [maxLength]="40"></app-read-more>

By default it will reduce the string to 30 words if user does not pass the maxLength

Contribution

Bug fixes and features are welcomed.

Here is the link for module ng-readmore

Package Sidebar

Install

npm i ng-readmore

Weekly Downloads

107

Version

2.0.2

License

MIT

Unpacked Size

30.2 kB

Total Files

14

Last publish

Collaborators

  • hazrat84