Description
In the uiGridExpandableRow directive's precompile method there is a call to gridUtil.getTemplate. This method asynchronously grabs the expandable row template and can ultimately issue a http GET request to grab the template. Between the time it takes for the initial GET request to respond, many other GET requests could be initiated as the expandable row directives are being compiled before the initial request places the template in the template cache.
In our case, on a low latency network about 8 or 9 requests were issued before the template was added to the template cache.
A work around for us was to manually load the expandable row template ourselves at the start of directive definition that used the ui-grid using a $templateRequest call. Of course this still suffers from the same asynchronous issues but the timing seems to resolve the issue for us. I don't have any ideas at the moment for a permanent fix.