I am running this with flask on localhost:5000. It works if I just open the html file with a browser, but it does not work with flask. I have an array named "arr" with 4 numbers in it located inside my controller. I want to print out each number but ng-repeat will not do so. What's really interesting and key is that ng-repeat will repeat the number of times equal to the number of items in the array so that is good, but it just can't print the variable {{number}} in ng-repeat="number in arr". Here is my code:
<html ng-app='numberApp'>
<head>
<meta charset="utf-8">
<title>Cool</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js"></script>
<script>
var numberApp = angular.module('numberApp', []);
numberApp.controller('numberCtrl', function($scope, $http){
$scope.arr = [2, 4, 5, 6];
});
</script>
</head>
<body ng-controller="numberCtrl">
<table>
<tr>
<th>First</th>
<th>Second</th>
<th>Third</th>
</tr>
<tr ng-repeat="number in arr">
<td> {{ 'start' }} </td>
<td> {{ number }} </td>
<td> {{ 'end' }} </td>
</tr>
</table>
</body>
</html>
This is what shows up in the browser:
First Second Third
start end
start end
start end
start end
It will not print out {{ number }}. Thanks a million to anyone who can tell me why this is happening!