How to destroy templates in ionic?

Is there a way to destroy the templates that been cached or loaded. I have login screen, when I logout I need to destroy all the templates which been either cached or loaded and reload index.html(refresh the app). App should only have login page in the dom after logging out. Does anyone has a solution for it?

Thanks in advance