I have two sections to my AngularJS app which need separate nav bars:
Patents
patent nav bar: list patents, add patents
Transactions
transaction nav bar: current transactions, transaction history
I have read How to attach navbar only on certain pages using ui-router?, where you can use views, but that is including the templateUrl
in the state, where I have my templateUrl
declared in the component like so:
$stateProvider
.state('patents', {
url: '/patents',
component: 'patents',
})
angular.module('myApp').component('patents', {
bindings: { patents: '<' },
templateUrl: '../templates/patents/list/list-patents.htm'
});
Question
What is the best approach to include different navigation in my templates/states when using components in ui-router
? Apologies if the answer is straight forward.