Pre cache or pre compile templates


I have an app and something weird is happening. When I click a button, there is a noticeable delay in something happening i.e., my state is transitioned quite late and I can see the lag. The scope and root scope take time to render but the js code executes. I checked via a js timer.

It is happening only in one state. Perhaps the template is taking time in compiling. So, is there a way to pre-fetch or pre-compile the template? I know ionic is doing that but can I speed it up? And does ng-include causes any delay?



1 Like

Hi, have you solved this issue? I’ve very similar one, when I switch from home page to page with a slider box it takes significant time, and I have no idea how to solve it. The most strange thing that on codepen here: it works completely normal.

I have not been able to solve it. There is some problem with anchor tags I think. When I use buttons, it works somewhat faster than anchor tags but there is a lag.

1 Like