Skip to content

AndrewJBateman/ionic-ngx-pipes

Repository files navigation

⚡ Ionic ngx pipes

  • This project uses ngx pipes to modify the data shown to the user in the html template.
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

*** Note: to open web links in a new window use: ctrl+click on link**

📄 Table of contents

📚 General info

  • The ngx pipes can be used to modify strings, arrays, objects and use math and boolean operations.
  • Also has a 'time ago' pipe but check if it only works with moment.js or if a lighter package like day.js can be used. It has only 1 dependancy. You only import the pipes you use, not a whole library.

📷 Screenshots

Example screenshot

📶 Technologies

💾 Setup

  • npm i to install dependencies
  • Run ionic serve for a dev server. Navigate to http://localhost:8100/. The app will automatically reload if you change any of the source files.

💻 Code Examples

  • home.page.html extract showing use of pipes to show array keys and values, date and max value (callPipe function).
<p>{{ myObj | keys }}</p> <!--name,age-->
<p>{{ myObj | values }}</p> <!--Andrew,49-->

<p>Today is {{ today | date }}</p>

<ion-button (click)="callPipe()">Call Pipe</ion-button>
callPipe() {
    // this.datePipe.transform(Date);
    alert(this.maxPipe.transform(this.numbers));
}

🆒 Features

  • ngx-pipes has no external dependencies. Pipes are injectable and can be used in Components / Services / etc.

📋 Status & To-Do List

  • Status: Working.
  • To-Do: Try other pipes.

👏 Inspiration

📁 License

  • This project is licensed under the terms of the MIT license.

✉️ Contact

  • Repo created by ABateman, email: gomezbateman@yahoo.com

About

📋 Ionic app using the ngx-pipes package for more advanced pipes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published