angular script to the beginning of the page to prevent data flushing