Tag Archives: javascript

Rarely, but every once in a while you will run into the need to have multiple root angular modules with two-way communication between them. A good example would be embedding anuglar into a static webpage for only certain portions of the page. The solution? A shared singleton service! In the following example we take a not-so-conventional case of having a navigation and the content both as a single independent root […]

API validation with Sails.js

Upon many failed efforts to find a working validation hook / middleware for Sails.js 1.x, I gave up and created my own helper hook. You can find it under sails-hook-validation-ev on github. About It is a Sails 1.x hook for validating REST requests with the help of express-validator. Because - why reinvent the wheel? Uses the same configuration functions as express-validator. Supports validators, sanitizers, localization, … Installation As simple as: $ npm install - save […]