currently doing an tutorial. I don't get any errors inside the google chrome console and since my code is pretty much 1:1 with the authors one, i guess the error comes from changes in the angular syntax (tutorial is a little bit outdated i guess).
index.html:
<!DOCTYPE html>
<html ng-app="app">
<head>
<title> Expense App </title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<ng-view></ng-view>
<!-- AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/3.6.6/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.3.0/angularfire.min.js"></script>
<script type="text/javascript" src="/app.js"></script>
<script type="text/javascript" src="/home/home.js"></script>
</body>
</html>
app.js:
var app = angular.module('app', ['ng-route', 'firebase']);
app.config(function($routeProvider){
$routeProvider.when('/home', {
template: '<home></home>'
})
.otherwise('/home')
});
/home/home.js:
angular.module('app').component('home', {
templateUrl: '/home/home.html'
});
/home/home.html
<h1> Expenses App </h1>
Pretty much straight forward. The problem is that home.html isn't rendered at all. If i manually type in localhost:3000/home/home.html i get access to it. So i guess its a problem with the routing. Any ideas?