简体   繁体   中英

AngularJS mustache doesn't load in IE9 unless in dev mode

I've a weird bug where AngularJS doesn't appear to parse/compile the mustache and bind it to a variable on the first loading of the site (see screenshot). The problem goes away if I enter into development mode and refresh the page; hence it becomes hard to debug since I can't see the errors.

在此处输入图片说明

There is a live version of the site available at http://www.notable.ac

If it's the console issue...

Just add a stub in the root of your JS:

//make sure console.log exists in ie.
window.console = window.console || {};
window.console.log = window.console.log || function(){};

console is not available in IE with dev tools disabled, you can just test:

if(console && console.log) { 
  console.log('ok');
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM