Is there a way to extend controllers in sails.js

Posted by alarner on Stack Overflow See other posts from Stack Overflow or by alarner
Published on 2013-10-22T03:50:01Z Indexed on 2013/10/22 3:53 UTC
Read the original article Hit count: 191

Filed under:
|
|

Often times I will want to perform some action on every page of my web application or make some method available to all of my controllers. In the past with object oriented MVC frameworks I would have all of my controllers extend a root controller, placing everything I wanted done on every page in the constructor of that root controller. How would I accomplish something similar with sails.js / javascript?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about node.js