Add $resource and $cachedResource to window