DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

han huynh

Software engineer at Bosch

HCMC, VN

Joined Dec 2015

http://hanhuynh-portfolio.herokuapp.com/

Stats

Reputation: 411
Pageviews: 136.5K
Articles: 1
Comments: 4
  • Articles
  • Comments

Articles

article thumbnail
Don't Use Functions Inside Angular Templates and What to Use Instead
To make your app do stuff you need functions, right? It turns out that pipes can actually be more useful in some instances.
Updated December 28, 2018
· 121,517 Views · 24 Likes

Comments

Don't Use Functions Inside Angular Templates and What to Use Instead

Oct 14, 2019 · han huynh

It's quite complicated than I've thought, please keep us posted if you have a solution for this

Don't Use Functions Inside Angular Templates and What to Use Instead

Oct 13, 2019 · han huynh

But i found out with async pipe, somehow nested our nested custom pipe inside it will not work efficiently as expected
I`d recommend we handle the get async data process inside the component and handle the subscription by our own to leverage the advantage of custome pipe
Just created another brand for this situation, added sorting pipe and async get data . You can take a look
https://github.com/truonghan0812/tutorials/tree/custom-pipe-async/src

Don't Use Functions Inside Angular Templates and What to Use Instead

Oct 13, 2019 · han huynh

Could you try this, notice the custome pipe will be on the right hand side of async pipe:
<tr *ngFor="let member of dataFromServer$ | async | sortBy:'asc':'point' ; index as i">


Don't Use Functions Inside Angular Templates and What to Use Instead

Oct 12, 2019 · han huynh

Thanks for reading my article,

I really not sure about what is your situation, seems like you may want to try with Async Pipe

https://angular.io/api/common/AsyncPipe

If it's not the case, please post a sample code just to make sure I understand your question

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: