Hey there! I'm new to JS and currently experimenting with a simple Angular ui-router example. However, I am encountering some issues with getting the router to work properly and I can't seem to figure out why. I've double-checked that both Angular and custom.js have been loaded successfully (which they have), but for some reason, the router is not functioning as expected. Despite my limited knowledge in this area, I can't pinpoint anything obviously wrong (since this is essentially a copy-paste example).
--HTML---
<!DOCTYPE html>
<html ng-app = "routerApp">
<head>
<title></title>
<script src="js/angularmin.js"></script>
<script src="js/custom.js"></script>
</head>
<body>
TEST APP
<div ui-view></div>
</body>
</html>
--js/custom.js--
var routerApp = angular.module('routerApp', ['ui.router']);
routerApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'home-partial.html'
})
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('about', {
// we'll get to this in a bit
});
});