Problem:
I started using angular.js for my project and during development I noticed that controller sometimes doesn't load, so I tried removing parts of the project until the smallest possible example but the problem still remains.
Code:
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body ng-app="myApp">
<div ng-controller="TestController">
<input ng-model="testText" type="text" placeholder="Enter text">
</div>
<script src="/static/js/angular.js"></script>
<script src="/static/js/app.js"></script>
</body>
</html>
app.js
console.log("INIT");
angular.module('myApp', [])
.controller('TestController', ['$scope', function($scope) {
$scope.testText = '172.17.2.1';
console.log("SCOPE");
}]);
Note:
"INIT" part always gets displayed in console. Altough "SCOPE" part sometimes (or most of the time) doesn't so the input field doesn't get filled.
Versions:
Chrome: 36.0.1985.125
Angular.js: 1.3.14