1

I'm using the Wc3 schools example of angular js, however; the given code doesn't work when I run it in IE11. It does work for Chrome.

<!DOCTYPE html>
<html>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>

<div ng-app="">
<p>My first expression from WC3S Schools: {{6+13}}</p>
</div>

</body>
</html>
3
  • 1
    Works just fine in JSFiddle: jsfiddle.net/5jo29t2v Commented Nov 19, 2015 at 16:17
  • can you try ng-app="myapp" Commented Nov 19, 2015 at 16:17
  • @entre it isn't necessary for the expression to be successfully evaluated. Commented Nov 19, 2015 at 16:18

2 Answers 2

2

Internet explorer blocks <script> tags that reference external scripts (http://ajax.googleapis.com/...) when you open the file from disk (file://) by default.

You might get a warning that tells you something like "Executing of scripts and ActiveX-Elements is limited for this page". (screenshot in german)

screenshot in german

Either host your example.html on a server and access it via http://... or enable active content in IE. I would recommend running it from a server, since IE has other limits on file:// links (like denying AJAX requests).

Sign up to request clarification or add additional context in comments.

Comments

1

When viewing HTML pages from a local resource (disk) you should allow scripts to be run when using IE. There is a yellow "popup" at the bottom of the screen, "IE restricted this webpage...." with an "allow blocked content" button. When you press this button it works

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.