Balakumaran
Balakumaran

Reputation: 63

Angular js issue in ie9

angular controller is not working while using ie9 browser .It's throw below error

TypeError: Unable to get value of the property 'nodeName': object is null or undefinedundefined

same code working fine (ie>9 , chrome ,firefox);

My js code is

var app = angular.module('app',[]);
app.controller('Ctrl',function($scope){
    alert('sa');
    console.log($scope);
});

My Html code is

<!DOCTYPE html>
<html ng-app="app">
....
...
...
<body id="top" ng-controller="GreetingController">

..

And also

Scope variable is undefined while getting scope variable from angularjs

var scope = angular.element($("#top")).scope();

Thank you

Upvotes: 0

Views: 90

Answers (1)

Thalaivar
Thalaivar

Reputation: 23632

your ng-controller="GreetingController" while your controller file has a name Ctrlapart from this follow the guidelines dictated here for ie. https://docs.angularjs.org/guide/ie

Another associated link for the same... check your HTML markup. https://github.com/angular/angular.js/issues/3172

Upvotes: 2

Related Questions