I started looking into Angularjs today and have an issue that I just can't solve.
I added a first controller and it just won't work. Adding the controller breaks my entire app.
<html ng-app>
<head>
</head>
<body>
<div ng-controller="test"></div>
<input type="text" ng-model="name" /> {{ name }}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script>
function test($scope) {
$scope.people='';
}
</script>
</body>
</html>
If I take out:
<div ng-controller="test"></div>
Everything works. I have add that line nothings works anymore. I know that my controller does not do anything and that I don't use the scope. It's because I broke down a bigger example.
Still, the controller exists and adding it to my view should not cause problems.
Probably it's just a small error, but I just can't find it!
I am following this guide: https://youtu.be/i9MHigUZKEM?t=30m6s.
Thanks for any help!