菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码:
点击运行
保存
<!DOCTYPE html> <html> <meta charset="UTF-8"> <script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script> <body ng-app="myApp"> <div ng-include="'https://c.facesoho.com/facesohotest/angular_include.php'"></div> <script> var app = angular.module('myApp', []) app.config(function($sceDelegateProvider) { $sceDelegateProvider.resourceUrlWhitelist([ 'https://c.facesoho.com/facesohotest/**' ]); }); </script> <p>你需要设置服务端允许跨域访问,设置方法可参考 <a target="_blank" href="/w3cnote/php-ajax-cross-border.html">PHP Ajax 跨域问题最佳解决方案</a>。 </body> </html>
运行结果