2015-11-05 94 views
0

我想使用IE條件註釋來加載基於IE版本的Angular腳本。但條件註釋不起作用,它會拋出錯誤,因爲角度是不確定的?誰能幫我這個? IE條件註釋將不會在<asp:content>標記內工作?IE條件註釋不能在aspx頁面工作

<asp:Content ID="Content2" ContentPlaceHolderID="ScriptSection" runat="server"> 

    <!--[if lt IE 9]> 
<script src='<%= Page.ResolveClientUrl("~/Scripts/angular-1.2.16.min.js")%>' type="text/javascript"></script> 
<![endif]--> 

    <!--[if gte IE 9]> 
<script src='<%= Page.ResolveClientUrl("~/Scripts/angular.min.js")%>' type="text/javascript"></script> 
<![endif]--> 
</asp:Content> 

回答

1
<![if IE]> 
<script src='<%= Page.ResolveClientUrl("~/Scripts/angular-1.2.16.min.js")%>' type="text/javascript"></script> 
<![endif]> 

<![if IE]> 
<script src='<%= Page.ResolveClientUrl("~/Scripts/angular.min.js")%>' type="text/javascript"></script> 
<![endif]> 
+0

歡迎的好友:) –