Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在HTML页面中设置的对象标记值,Angular JS模型在Microsoft Edge browser中不起作用_Javascript_Html_Angularjs_Ajax_Microsoft Edge - Fatal编程技术网

Javascript 在HTML页面中设置的对象标记值,Angular JS模型在Microsoft Edge browser中不起作用

Javascript 在HTML页面中设置的对象标记值,Angular JS模型在Microsoft Edge browser中不起作用,javascript,html,angularjs,ajax,microsoft-edge,Javascript,Html,Angularjs,Ajax,Microsoft Edge,我有一个HTML像下面 <div class="tab-content"> <div ng-repeat = "(key,val) in reportCollection" id="{{val.url}}" class="tab-pane fade in" ng-class="{'active': $index == 0}" repeat-done="layoutDone()"> <object data="{{val.url}}/index

我有一个HTML像下面

  <div class="tab-content">
    <div ng-repeat = "(key,val) in reportCollection" id="{{val.url}}" class="tab-pane fade in" ng-class="{'active': $index == 0}" repeat-done="layoutDone()">
      <object data="{{val.url}}/index.php" style="width:100%;height:80%;"></object>
    </div>
  </div>
在Chrome和Firefox中,在更新模型后不久,不同的http请求被发送到ng repeatI中的不同对象标签上,该标签由开发者控制台和网络标签检查。所以一切都很好

但是在Edge中,发生了不同的ajax调用,但是ajax调用路径是val.url,而不是集合中的实际url

比如说我的收藏是

var reportCollection = [

              {'url':'test.html',....},
              {'url':'myPage.html',....}

]
现在,chrome和firefox中的http请求url为

     http://.../.../.../test.html
     http://.../.../.../mtPage.html
但在边缘,它就像

     http://.../.../.../%7B%7Bval.url%7D%7D/
很明显,它是以{{val.url}}作为url


你能详细告诉我为什么会发生这种情况以及如何解决它吗?

试试,这样做:

 <object data="{{val.url+'/index.php'}}" ....>
或:


我相信这篇文章会涉及到这个问题:


基本上,Edge是在angular有机会替换val.url属性之前评估数据属性。尝试在上面的链接上使用已接受的答案。

不起作用,现在它类似于%7B%7Bval.url+'/index.php“%7D%7DIt看起来Edge对花括号的解释不同,您是否尝试只输出使用ng attr的结果?解决了我的问题。
 <object data="{{val.url+'/index.php'}}" ....>
<object ng-attr-data="{{....}}" >