concept pug mixin in category angular

appears as: Pug mixin
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.3.6. Formatting dates using a Pug mixin

Back when you were setting up the views, you used a Pug mixin to output the rating stars based on the rating number provided. In Pug, mixins are like functions; you can send parameters when you call them, run some JavaScript code if you want, and have them generate some output.