My application is trying to load the angular module discApp . This is working without any issues in Chrome . But in IE11 i am getting an error like below
object doesn't support property or method 'module' .
Angular Version is using is v1.5.5. If i try ctrl+F5 its loading correctly . Is there any way to fix this issue? My Js Code where the error throwing in IE is below .
'use strict';
var discApp = angular.module('discApp', ['discApp.controllers']); //Error in this line
Below is the code where i am adding the angular.js
<script>document.write("<script type='text/javascript'
src='js/angular/angular.js?v=" + Date.now() + "'><\/script>");</script>
Please try to modify your code as below, and check whether it meets the same error?
'use strict';
var discApp = angular.module('discApp', []);
If it still meets the same error, perhaps the issue is related to the angular.js reference, try to use the following script to load angular.js reference:
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.min.js"></script>
If the error disappears, the issue is related to the 'discApp.controllers', you could check it.
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.