Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Bahamut
on March 1, 2015
|
parent
|
context
|
favorite
| on:
Live Sails.js Course
Why not place the model usage in services and use the services in the controllers?
campbellmorgan
on March 1, 2015
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: