February 2017
Beginner to intermediate
294 pages
6h 9m
English
In this chapter, we implemented four TypeScript classes for rating logic, rating services, rating components, and a sorting pipe.
We saw how we can achieve a better maintainable code by separating different parts of logic and organizing them in its own classes. We created a new pipe to sort the result array based on their ranks and then we used it inside our template.
In the next chapter, we will see how to delegate the ranking process to the service we have created here and use it in another service called notifier to inform us if something interesting - a high ranked news based on our business logic - is happening in the world.
Read now
Unlock full access