PHP中文网2017-05-15 17:11:35
預設是同源策略,如果你想載入其他不在同一個網域的資源,你需要了解 $sce,設定白名單
這是官網一段描述
By default, the template URL is restricted to the same domain and protocol as the application document. This is done by calling $sce.getTrustedResourceUrl on it. To load templates from other domains or protocols you may either whitelist them or wrap them as trusted values. Refer to Angular's Strict Contextual Escaping.