mallikarjun mallikarjun - 3 months ago 46
AngularJS Question

Angularjs example not working in firefox

Am practicing basic angularjs app. It is working in IE 11 but not in firefox 33.1

<!DOCTYPE html>
<html>

<head>
<script src="C:\Users\Mallik\Desktop\mallik\ch\jquery-1.11.1.min.js"></script>
<script src="C:\Users\Mallik\Desktop\mallik\ch\angular.min.js"></script>
</head>

<body>

<div ng-app="app">
<p>Name: <input type="text" ng-model="name"></p>
<p ng-bind="name"></p>
</div>

</body>
</html>


What is wrong with my code.

Answer

As you do not have any module, your module should be null by default ie change ng-app="".

<div ng-app="">
  <p>Name: <input type="text" ng-model="name"></p>
  <p ng-bind="name"></p>
</div>
Comments