This error usually means that some part of the code (js) was not loaded. That there is no state inside ui-sref .
There is a working example
I'm not an expert in ionic, so these examples should show that it will work, but I used a few more tricks (parent for tabs)
This is a bit state.
.config(function($stateProvider, $urlRouterProvider){ $urlRouterProvider.otherwise("/index.html"); $stateProvider .state('app', { abstract: true, templateUrl: "tpl.menu.html", }) $stateProvider.state('index', { url: '/', templateUrl: "tpl.index.html", parent: "app", }); $stateProvider.state('register', { url: "/register", templateUrl: "tpl.register.html", parent: "app", }); $urlRouterProvider.otherwise('/'); })
And here we have a parent view with tabs and their contents:
<ion-tabs class="tabs-icon-top"> <ion-tab title="Index" icon="icon ion-home" ui-sref="index"> <ion-nav-view name=""></ion-nav-view> </ion-tab> <ion-tab title="Register" icon="icon ion-person" ui-sref="register"> <ion-nav-view name=""></ion-nav-view> </ion-tab> </ion-tabs>
Do it more than an example of how to make it work, and then use the ionic framework correctly ... Check this example here
Here Q and A are similar with an example using named representations (more precisely, the best solution), the problem with ion routing shows a blank page
An improved version with named views on the tab is here: http://plnkr.co/edit/Mj0rUxjLOXhHIelt249K?p=preview
<ion-tab title="Index" icon="icon ion-home" ui-sref="index"> <ion-nav-view name="index"></ion-nav-view> </ion-tab> <ion-tab title="Register" icon="icon ion-person" ui-sref="register"> <ion-nav-view name="register"></ion-nav-view> </ion-tab>
named view targeting:
$stateProvider.state('index', { url: '/', views: { "index" : { templateUrl: "tpl.index.html" } }, parent: "app", }); $stateProvider.state('register', { url: "/register", views: { "register" : { templateUrl: "tpl.register.html", } }, parent: "app", });