Fix window.angularReady undefined and timeouts

This should fix some issues like #3 and #11
`window.angularReady` was undefined because `injector` was not setting correctly. wrapping the code in ```javascript angular.element(document).ready(function() {}); ``` fixed that for me.

Timeouts were thrown because `window.angularReady = false;` was sometimes setting when there was no outstanding requests, therefore a callback to set `angularReady` to `true` was not fired.