From http://stackoverflow.com/questions/22189544/print-a-div-using-javascript-in-angularjs-single-page-aplication