2

This is how I define the href tag.

<ion-item ng-repeat="chapter in chapters" ng-href="#/tab/kurals">
    {{chapter}}
</ion-item>

When I click on the item, the url of the browser changes to /tab/kurals, but there is no change in the view. Still the old view is shown. For ionic tabs, I have an abstract route. All other links works fine.

Below is how I defined my routes.

$stateProvider.state('tab.kural', {
    url: '/kurals',
    views: {
        'tab-kural': {
            templateUrl: 'templates/tab-kural.html',
            controller: 'KuralCtrl'
        }
    }
});

I have also tried this.

$stateProvider.state('tab.kural', {
    url: '/kurals',
    templateUrl: 'templates/tab-kural.html',
    controller: 'KuralCtrl'
});

There are no errors in the console.

What could be the possible reasons?

ScubaSteve
  • 7,724
  • 8
  • 52
  • 65
Purus
  • 5,701
  • 9
  • 50
  • 89

1 Answers1

0

ng-href="#/tab/kurals" will not gonna match url: '/kurals' you can change any of then for it like url:'/tabs/kurals' or ng-href="#/kurals". Else best way it to u use ui-serf="tab.kural".

I am assuming your child view name is "tab-kural".

squiroid
  • 13,809
  • 6
  • 47
  • 67