One unique aspect of my website is the navigation bar. It appears on some pages but not others, so I've created a controller specifically for it. Here's how the navigation bar markup looks:
<html ng-app="myApp">
<head>
<title> My layout.html </title>
</head>
<body>
<nav ng-controller="NavCtrl">
I have this NAVBAR
</nav>
<div ui-view></div>
</body>
</html>
Typically, I would specify the name of the controller in my routes like this:
$stateProvider.state('/', {
controller: 'NavbarCtrl'
});
However, in this particular case, there isn't a route corresponding to the navbar - just the navbar controller file itself. Therefore, my question is: how can I register the controller without a templateUrl
through ui-router?