AngularJS 1.3 page won't load in IE8

后端 未结 6 978
被撕碎了的回忆
被撕碎了的回忆 2021-02-09 23:52

As an angular user, I too shudder at the title of this question, due to the fact that IE8 is evil incarnate and should be put down like a rabid dog.

that being said, I w

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-10 00:22

    Based on answers from SamHuckaby and Zenorbi, i came up with acceptable solution which is a combination of their ideas and insights from this article IF Internet Explorer THEN Do Something Else (A How To...) by Phil Nash:

         
            
            
        
    
        
    
        
    
            
            
    

    ... - Conditional comment will be evaluated by IE, but the scripts within won't get loaded by IE and will get loaded by all other browsers

    - Conditional comment will be evaluated by IE and if greater than IE 8, scripts will get loaded

    - Conditional comment will be evaluated by IE and if less than IE 9, scripts will get loaded.

    Both es5-shim and es6-shim should be put out of IE8 conditional comment block and checked by all browsers (and it's not expensive operation) as i recently found out that Safari has issues with String.prototype.startsWith()

    Yeah we have some code duplication inside the first and the second conditional comment (and it can't be solved in a different way) but we have zero unwanted scripts loaded and we can close our task here.

提交回复
热议问题