externalize angular resource