replaced default document object with angular