Aurelia Component Communication, Leverage Services, Part 2

Hello guys, I hope you have found part 1 of this article useful, we used properties of our services to store the states we required in our application. However, in the previous part there was two problems, first, the properties using services’ properties are dirty checked, and that’s not good at all, we can add @computedFrom attribute on top of them to inform Aurelia that these properties rely on changes of other properties so the change management mechanism will handle it properly, In vNext that is not necessary as the framework will detect them automatically. Next, there are times that we may not use properties in the views, if so, then our components won’t get notified when the properties they depend upon change, that’s where EventAggregator and aurelia-store come to play. Let’s find out more about them.

Read More

Aurelia Component Communication, Leverage Services, Part 1

Hello and welcome! In this post I want to discover how you can take advantage of services to make components of your application talk to each other. This is inspired by what Mrs. Deborah Kurata explained here and I have tried to adapt it to the world of Aurelia. I have created a Github repository so that you can use it to follow up with this post. I am a great fan of typescript which is used in the sample, besides I also used aurelia-toolbelt as the UI library with the aurelia-cli configured with built-in bundler and no tests. Shall we start? Let’s do it!

Read More