Angularjs - ng-route not working on IE9 - the views are not displayed

前端 未结 3 1815
名媛妹妹
名媛妹妹 2020-12-17 04:51

I\'m a beginner with Angularjs. I\'m going to develop an application with this framework and Coldfusion for retrieving data from the database.

I have a problem with

相关标签:
3条回答
  • 2020-12-17 05:02

    I ran into the same problem where I just got a blank page in IE 9. In chrome, FF and IE 10 and 11 routing worked fine and the first page of my app, the login page, would appear. I tried the meta tag but it did not fix the issue. I also tried moving ng-app to the body tag. Still didn't fix it. One other strange thing was when I opened IE developer tools suddenly it would work and my login page would appear. I did some additional searching and found that using console.log anywhere in the JavaScript can cause issues in IE. Once I removed all console.log calls in JS files, added the meta tag and moved ng-app to the body tag, routing worked on IE 9 in both standard and compatibility mode.

    0 讨论(0)
  • 2020-12-17 05:08

    This may be a shot in the dark but I have seen it happen before ..

    Try moving

    ng-app="ContactsApp" class="ng-app:ContactsApp" id="ng-app"

    To the body tag and not the html tag

    I don't know why this happens but I have had a similar issue, moving the tag to the body fixed it for me

    0 讨论(0)
  • 2020-12-17 05:14

    I have found the solution by adding the following "meta" tag in the "head" part of the page:

    <meta http-equiv="X-UA-Compatible" content="IE=edge">       
    

    With this tag, all works now perfectly in IE9.

    0 讨论(0)
提交回复
热议问题