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
angular.element().scope()outside of debug/test code! It's only available when debug data is turned on, and you ought to turn that off in production, as it gives you a significant performance boost.