Angular 1.6.6阻止我的网址采购到另一个项目

时间:2017-12-15 13:54:38

标签: angularjs

我的项目中有以下声明(在Index.html内)......

var amqApp = angular.module('amqApp', ['moment-picker'])
            .config([
                '$compileProvider', 'momentPickerProvider', '$sceDelegateProvider',
                function ($compileProvider, momentPickerProvider, $sceDelegateProvider) {

                    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|stcall|chrome-extension):/);                                     

                    momentPickerProvider.options({
                        format: "MM-DD-YYYY hh:mm a",
                        today: true
                    });

                    $sceDelegateProvider.resourceUrlWhitelist([
                        // Allow same origin resource loads.
                        'self',
                        // Allow loading from our assets domain. **.
                        'http://localhost*/**',
                        '*localhost*',
                        'http*',
                        '*54497*',
                        '**',
                        '*'

                    ]);

                }
            ]);

我正在尝试允许使用其他项目的javascript方法。我已经找到了另一个项目...

<script type="text/javascript" src="@(FayShared.FS.GetAppSetting("CommonServicesURL") + "/_shared/loan-search.directive.js")"></script>
<script type="text/javascript" src="@(FayShared.FS.GetAppSetting("CommonServicesURL") + "/_shared/commonService.js")"></script>

但是当我尝试运行此命令时出现阻塞错误...

  

angular-1.6.6.js:14700错误:[$ sce:insecurl]阻止从$ sceDelegate策略允许的url加载资源。网址:http://localhost:54497 / _shared / loan - search.directive.html   http://errors.angularjs.org/1.6.6/ $ SCE / insecurl?P0 = HTTP%3A%2F%2Flocalhost%3A54497%20%2F%20_shared%20%2F%20loan%20-%20search.directive.html

以前这种情况有用,我不确定为什么它不会阻止我的网址。有什么想法吗?

0 个答案:

没有答案