Ich benutze das neue angularjs v1.5.7
Aber ich weiß nicht, was mit meinem Code falsch ist, dass meine App überhaupt nicht läuft.Warum funktioniert meine eckige App nicht?
hier ist meine HTML-Datei:
<!DOCTYPE html ng-app="myApp">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Testing App</title>
<link rel="stylesheet" href="">
<script src="angular.js"></script>
</head>
<body ng-controller="main">
<h1>Testing page {{2+2}} {{name}}</h1> //i am not getting any result
<script src="app.js"></script>
</body>
</html>
hier ist meine app.js Datei:
angular.module('myApp', []);
angular.module('myApp').controller('main', function ($scope) {
alert('hi')
$scope.name = "testing";
});
ich bin nicht entweder Fehler oder Arbeits Ausgabe hier bekommen. Kann mir hier jemand helfen? und korrigiert mich?
Was sagt die Konsole? – oxalorg
Sie setzen ng-app an falscher Stelle – abdoutelb