1

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.

mallikarjun
  • 1,862
  • 5
  • 23
  • 47
  • possible duplicate of [Open local folder from different browsers](http://stackoverflow.com/questions/25408031/open-local-folder-from-different-browsers) – JJJ Nov 15 '14 at 08:19
  • Install a local server. Don't even try to access the files through the filesystem. – JJJ Nov 15 '14 at 08:20
  • Try to use the latest version of jquerry (2.1.0). – arman1991 Nov 15 '14 at 16:54

2 Answers2

2

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>
Mhadonis
  • 330
  • 3
  • 11
0

In firefox when script src is referred with absolute path it fails in recognizing the files properly. Try to change it to Relative Path, it will work.

Absolute path:C:\Users\Mallik\Desktop\mallik\ch\angular.min.js

Assuming the html file is in mallik folder

Relative path: ../ch/angular.min.js

Try this it should work.

Rajan
  • 111
  • 6