angular.js - Does the ng-include and html of angularjs have to be on the same server?
伊谢尔伦
伊谢尔伦 2017-05-15 17:09:35
0
2
515

I want to implement players from other servers to the current page. How should I implement it?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
小葫芦

The files introduced using ng-include must be under the same domain name, so what you want to achieve may need to find another way

Ty80

The default is the same origin policy. If you want to load other resources that are not in the same domain, you need to understand $sce and set up a whitelist
This is a description from the official website

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.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template