refactor(docs) use $window and add description for code directive

- This refactors to use <code>$window</code>, the Angular way instead  of using `window` Object. 
- Also adds documentation to the `code` directive. 

P.S. also signed Contributor License Agreement (CLA). 
there's no reason to use JSDoc tags --- I don't think it's necessarily bad to document what it actually does though, in case anyone else needs to work on it in the future