3 ms·
In our project we've ended up with our controller code being defined outside of the .controller call (we're using TypeScript, and someone wanted to use the clas
by Ycros 13y ago
In our project we've ended up with our controller code being defined outside of the .controller call (we're using TypeScript, and someone wanted to use the class syntax). This means that our controllers are accessible directly, and for a unit test, they're just functions we can call.
So we just pass our own mocks in, it's much simpler than trying to use Angular's injector mechanism.