Use AngularJS wrappers

Fixes #54 by using  and
Injects $window and $document
Merge pull request #68 from grevory/use-ng-wrappers

Use AngularJS wrappers