Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Pipe #11

Open
web-dave opened this issue May 6, 2024 · 1 comment
Open

Create a Pipe #11

web-dave opened this issue May 6, 2024 · 1 comment

Comments

@web-dave
Copy link
Owner

web-dave commented May 6, 2024

  • Generate a pages pipe
ng g p book/pages
  • Implement a pipe that takes a number and a string and returns aformated string like Number of pages: 640
pages.pipe.ts
    transform(value: any, args?: any): any {
      return `${args}: ${value}`;
    }
  • Use this Pipe in your book-details Component
@web-dave
Copy link
Owner Author

web-dave commented May 6, 2024

NEXT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant