ionic framework - Use href to redirect to tab in angularjs -


i'm trying ionic tab template. got stage have second-level tab in 1 of main tabs.

.state('tab.leaderboard', { url: "/leaderboard", abstract:true, views: {   'tab-leaderboard': {       templateurl: "templates/tab-leaderboard.html",       controller: 'leaderboardctrl'   } } })  .state('tab.leaderboard.players', { url: "/players", views: {   'leaderboard-page': {       templateurl: "templates/players-leaderboard.html",       controller: 'playersctrl'   } } })  .state('tab.leaderboard.teams', { url: "/teams", views: {   'leaderboard-page': {       templateurl: "templates/teams-leaderboard.html",       controller: 'teamsctrl'   } } }) 

if use direct link tab tab.leaderboard.teams, url on address bar changes, bar title changes content not loading , current page made call stays opened.

however if click on link tab.leaderboard.teams, works perfectly.

also if switch tabs on html , make teams tab first works teams , not players.

note if go manually tabs fine. problems happens when use href open it.

any appreciated.

edit

i used ng-click='func()' , on controller used $state.go('tab.leaderboard.teams') didn't work. same ui-sref on html. url changes not content.

angular-ui-router based on states. if want go 1 state have use "ui-sref" or "$state.go()"

for example :

<a ui-sref="statename">to go page</a> 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -