0

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

3

1 Answer 1

2

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

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

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.