I am arriving on bookDetails
state form some other link. Here bookDetails
state's template has links for different tabs
(or templates). And associated controller EditBookController
has a json file using which I am building forms in different tabs
with states like bookDetails.basic
and bookDetails.publisher
which use parent EditBookController
. It's working fine. How to directly display the default bookDetails.basic
instead of making user click the link? If I make bookDetails
abstract(abbstract:true) and provide an empty link to bookDetails.basic
I get following error Cannot transition to abstract state 'bookDetails'
$urlRouterProvider.otherwise('/home');
$stateProvider
.state('home', {
url:'/home',
controller: 'HomeController',
templateUrl: '/static/publisher/views/Publisher_Home_Template.html'
})
.state('books', {
url:'/books',
controller: 'BooksController',
templateUrl: '/static/publisher/views/Book_Listing_Template.html'
})
.state('bookDetails', {
url : '/books/:b_id',
controller: 'EditBookController',
templateUrl: '/static/publisher/views/Product_Page_Template.html'
})
.state('bookDetails.basic', {
url : '/basic',
templateUrl: '/static/publisher/views/tab1.html'
})
.state('bookDetails.publisher', {
url : '/publisher',
templateUrl: '/static/publisher/views/tab2.html'
})
A plunk with similar problem. but code is different On clicking form it should land on the profile profile form.