update doc viewer wrapper references to leave() to point at rootscope