concept rendering in category angular

appears as: rendering, rendering
Getting MEAN with Mongo, Express, Angular, and Node.js 2ED

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.

7.2.1. Separating concerns: Moving the rendering into a named function

There are a couple of reasons for moving the rendering into its own named function. First, you decouple the rendering from the application logic. The process of rendering doesn’t care where or how it got the data; if it’s given data in the right format, it uses that data. Using a separate function helps you get closer to the testable ideal that each function should do one thing. A related bonus is that the function becomes reusable, so you can call it from multiple places.