Hacker News new | past | comments | ask | show | jobs | submit login

Why not place the model usage in services and use the services in the controllers?



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: