AngularJS code not working on chrome on localhost in a folder

I am running simple hello world program (using AngularJS 1.6) from localhost on my ubuntu 17.04, localhost address is http://localhost/js/angular/4/ and the program is not working in Google Chrome, the same code runs all fine on Firefox, and if I rename the same folder to another number or if I keep the same code in another folder, it seems to be working all fine. What could be the reason of this weird behavior as I couldn't find anything similar to this on Internet while searching for the solution.

var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope) {
    $scope.message = "Hello World";
});
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp">

<div ng-controller="myCtrl">
{{ message}}
</div>

</body>
</html>

ng-appng-controller不能在同一个元素上。

链接地址: http://www.djcxy.com/p/88026.html

上一篇: 用HTML / CSS填充和输入高亮

下一篇: AngularJS代码无法在文件夹中的本地主机上使用chrome