Wrap angular module in a closure and use $window