Renamed tab's links and stop working


#1

Hi all,
i’m working on a project based on tab template.
I renamend the href links and relative names in the router and now I’m not able to switch to the different views.

<!-- Licenze in scadenza Tab -->
  <ion-tab title="Licenze in scadenza" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse" href='#/tab/lic_scadute'>
    <ion-nav-view name="tab-lic-scad"></ion-nav-view>
  </ion-tab>

  <!-- Licenze Mensili Tab -->
  <ion-tab title="Licenze mensili" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" href="#/tab/lic_mensili">
    <ion-nav-view name="tab-lic-men"></ion-nav-view>
  </ion-tab>

  <!-- Customer Tab -->
  <ion-tab title="Customers" icon-off="ion-ios-people-outline" icon-on="ion-ios-people" href="#/tab/customers">
    <ion-nav-view name="tab-customers"></ion-nav-view>
  </ion-tab>

The router is:

 	.state('tab.lic.scadute', {
	url: '/lic_scadute',
	views: {
  		'tab-lic-scad': {
    		templateUrl: 'templates/tab-lic-scadenza.html',
    		controller: 'LicenzeScadenzaCtrl'
  		}
	}
})

.state('tab.lic.mensili', {
	url: '/lic_mensili',
	views: {
  	'tab-lic-men': {
    	templateUrl: 'templates/tab-lic-mensili.html',
    	controller: 'LicenzeMensiliCtrl'
  	}
	}
})

Now I stay no the tab.customer state (the default one).
Where is the problem, please???


#2

State names use dot notation to indicate parent their state: tab.customers means that this is a child state of abstract state named tab.

When you name your state tab.lic.mensli, angular-ui router expects to find a parent state named tab.lic

Please read angular-ui router docs