I am having issues trying to get angular to work on my website. If I use
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.js"></script>
it works just fine. When I do @Scripts.Render("~/bundles/angular")
It doesn't work. My BundleConfig file contains this
bundles.Add(new ScriptBundle("~/bundles/angular")
.Include("~/Scripts/angular.js")
.Include("~/Scripts/angular-*"));
When looking at the page source it shows <script src="/Scripts/angular.js"></script> which is correct. I can click on the link from the page source and it loads up the file. When I click on the link to the Google API, it looks identical. I have even copy and pasted the contents of the Google API into my angular.js file so they are exactly the same. It still doesn't work. Furthermore, I added bootstrap the same way I did angular (they exist in the same folder and the bundle.Add for both are the same) and it is working great.
Here is webpage:
<html ng-app>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Hoop Statistics</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Players</a></li>
<li><a href="#">Team</a></li>
</ul>
</div>
</div>
<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1>
<script type="text/javascript">
function HelloWorldCtrl($scope) {
$scope.helloMessage = "Hello World";
}
</script>
<a href="#/test.html">Test</a>
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/angular")
@RenderSection("scripts", required: false)
@*<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.js"></script>*@
<script src="~/app/js/app.js"></script>
</body>
</html>