Looking to dynamically generate a navigation menu using an angularjs
controller:
index.html
:
<body>
<div ng-controller="navi">
<ul>
<li ng-repeat="nav in navigations">
<a href="{{nav.path}}">{{nav.name}}</a>
</li>
<ul>
</div>
<script src="js/navi.js"></script>
</body>
navi.js
:
angular.module('app').controller('navi') {
$scope.navigations = [
{"path": "www.google.de", "name": "Google"},
{"path": "www.bing.de", "name": "Bing"},
];
}
Observing a blank page as the result. Any ideas why?