Angular ui-router… Display default tab

前端 未结 3 567
温柔的废话
温柔的废话 2021-01-23 15:10

I am arriving on bookDetails state form some other link. Here bookDetails state\'s template has links for different tabs (or templates). A

3条回答
  •  广开言路
    2021-01-23 15:53

    From Directing the user to a child state when they are transitioning to its parent state using UI-Router:

    Either change the bookDetails.basic state to:

    .state('bookDetails.basic', {
      url : '',                  
      templateUrl: '/static/publisher/views/tab1.html'
    })
    

    Or add the following routing:

    $urlRouterProvider.when('/books/{b_id}', '/books/{b_id}/basic');
    

提交回复
热议问题