Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available!
You either misspelled the module name or forgot to load it.
I've searching a lot about my problem and can not find solution and I bet it's something silly.
My code:
myangular.js
(function(){
var app = angular.module('newapp', []);
app.controller("controller", function(){
this.creador = "daniel";
});
});
index.html
<!DOCTYPE html>
<html ng-app="newapp">
<head>
<title></title>
<script src="bower_components/angular/angular.js"></script>
<script src="js/myangular.js"></script>
</head>
<body>
<div ng-controller="controller as cont">
<strong>Hello World {{ cont.creador }}</strong>
</div>
</body>
</html>
myApp, notnewapp. Wrong file/project/folder?