I am currently experimenting with Angularjs and I have a question that I would like to clarify. I have created an HTML page with the following code: ...
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
<script>
angular.module("myapp", [])
.controller("MyController", function($scope) {
$scope.myvalue = "TEST";
} );
</script>
</head>
<body ng-app="myapp">
<div ng-controller="MyController" >
{{myvalue}}
</div>
</body>
</html>
Using this code, I am able to display the value I defined in the scope without the need for Route as everything is on the same page.
However, when I try to separate my view using ng-view, I encounter an issue that I can't seem to resolve. Here is the code I am using:
You can find the Plunker link here. When I attempt to add a partial, I receive an error related to ngRoute. I have included the ngRoute library and used the RouteProvider, but I am still missing something. What could be the issue? Here is the Plunker.
Thank you for your assistance.