I am trying to modify the ionic angular seed application to suit my purpose. I am using links <a>
with button definition for navigation. But the link is not resolving to the required view. Webstorm IDE throws the below error:
Cannot resolve anchor #/tab/deals in file tab-dash.html
The link is written as below:
[ open a tag ]
class="button button-outline button-calm" style="width: 48%;" href="#/tab/deals" >
Queries
[closing a tag]
and the relevant state routing code from App.js is as below.
.state('tab.deals', {
url: '/deals',
views: {
'tab-deals': {
templateUrl: 'templates/tab-deals.html',
controller: 'dealsCtrl'
}
}
})
It used to work when it was in the footer tab section. But not working when I moved it to main section under <ion-nav-view></ion-nav-view>
Not familiar with Webstorm however, you can use ui-sref directive in its place. Replace the path name with the name of the state you want to navigate to:
<a class="button button-outline button-calm"
style="width: 48%;"
ui-sref="tab.deals">Queries</a>