I'm using angular version 1 with jasmine for my unit tests.
The test I want to do is:
When I load the index.html page in ie7 for example I load in a html banner saying download latest browser.
I'm currently loading a html template using JQuery on the index page.
Is it possible to test this since its outside the angular app.
This is my current code on my index.html page:
<!doctype html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<base href="/app/" />
<!-- Is Angular supported -->
<script>
if(window.angular === undefined)
$(function(){$("#angularNotSupportedModal").load("/app/noAngularModal.html");});
</script>
</head>
<body ng-app="app" ng-cloak>
<div id="angularNotSupportedModal"></div>
<div ui-view></div>
<!-- Application -->
<script src="/scripts/app.js"></script>
<!-- Config -->
<script src="/scripts/config.js"></script>
</body>
</html>
Any suggestions would be great.
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…