Closed boeserwolf closed 8 years ago
Hi @leocaseiro, thanks for your reply. Sorry, my bad, I should really have tested that.
That's interesting:
First, I don't think you should use document.ready, because all angular code will execute when document ready as default.
After further research, it looks like there's no need for $document.ready() or $timeout(), because Angular won't initialize until the DOM was loaded:
jqLite(window.document).ready(function() {
angularInit(window.document, bootstrap);
});
})(window);
As far as I understand, we should be good with just calling element.chosen(). I've updated the pull request correspondingly. Are you solving another specific issue by postponing the statement with $timeout()?
Thanks!
Hi @boeserwolf,
Thanks again.
Unfortunately, I had to add $timeout to solve the issue #176
I'll need to work on this on the weekend. I'd like to have a solution for both issues.
Seems #213 solves it
Closes in regards to #213 Thanks for all help guys!
Hi @boeserwolf, thanks for updating the tests. I really appreciate that.
However, it seems no tests are really running. I've tried to fail them, switching from true to false and so on, but they still passing through.
I believe karma doesn't wait for the dom to run the tests. I did some research about that, and I'll need to move the tests for a service.