You have to put your script tag after the one that references Angular. Move it out of the head
:
<script type="text/javascript" src="https://stackoverflow.com/questions/18044519/angular.min.js"></script>
<script type="text/javascript" src="main.js"></script>
The way you’ve set it up now, your script runs before Angular is loaded on the page.