在 Edge 中加载图像问题

Loading image issue in Edge

我有一个显示当前用户图像的网站。该站点使用 Angularjs 前端和 c# 后端。 这在使用 IE11、firefox 和 Opera 时效果很好,但在边缘它似乎无法找到图像。 我的 html:

<img ng-src="{{getImgUrl('@User.Identity.Name')}}" class="headshot" />

控制器中的方法:

$scope.getImgUrl = function (username) {
        var outputURL = "https://myurl.com/profilepictures/" + username + "_LThumb.jpg";
        return outputURL;
    };

风格:

.headshot {
padding-top: 10px;
padding-bottom: 10px;
}

在 getImgUrl 函数中,您似乎引用了 $scope.usernam(缺少一个 e)这看起来像一个错误我也猜到您想要引用传递给该函数的用户名而不是作用域中的变量,例如::

$scope.getImgUrl = function (username) {
    var outputURL = "https://myurl.com/profilepictures/" + username + "_LThumb.jpg";
    return outputURL;
};

我想我明白了。该应用程序是一个 Intranet 应用程序,问题是混合了 intra/inter -net。它在我启动应用程序时自行解决。 有关更多信息,请访问: SEC7117 Error when trying to load a javascript file in MS Edge