Re:Live Sails.js Course
by Bahamut on Sunday March 01, 2015 @12:27AM
(#9126143)
Why not place the model usage in services and use the services in the controllers?
[ Parent
| on HN ]
Re:Live Sails.js Course
by campbellmorgan on Sunday March 01, 2015 @05:19AM
(#9126605)
While that is a nice separation of concerns (Angular-style), it doesn't solve the problem for unit testing the controller because you still won't be able to inject a mock service into the controller without some beforeEach global variable hackery.