Click here to Skip to main content
15,746,973 members
Articles / AngularJs
Posted 5 Dec 2016

Tagged as


1 bookmarked

AngularJS on Internet Explorer

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
5 Dec 2016CPOL
Working with AngularJS on Internet Explorer


This snippet can be used while working with AngularJS on Internet Explorer.


While I was working with AngularJS for the first time, I had an issue with Internet Explorer. My code used to work on Firefox, but I was having trouble working with it on Internet Explorer. So, I thought of sharing this simple solution.

Using the Code

Below is a sample View (.cshtml) of the application.

<!DOCTYPE html>
<script src="/angular.min.js" type="text/javascript"></script>
<script src="/jquery-3.1.1.min.js" type="text/javascript"></script>
var app = angular.module("MyApp", [])
app.controller('MyCtrl', function ($scope) {
  $scope.YourFunction= function () {
    //Your code here
<div ng-app="MyApp" ng-controller="MyCtrl">

My page used to work fine in Firefox, but I was facing problems with the Internet Explorer browser.

It threw many errors like below:

SCRIPT5009: 'Node' is undefined
File: angular.min.js, Line: 184, Column: 339

SCRIPT438: Object doesnt support property or method 'addEventListener'
File: jquery-3.1.1.min.js, Line: 6, Column: 123

To solve the error, you just need to add the below line to your <head></head> tag:

<meta http-equiv="X-UA-Compatible" content="IE=Edge, width=device-width, initial-scale=1" />

This worked for me in Internet Explorer.

Add your solution if anyone has any other solution.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

-- There are no messages in this forum --