var app = angular.module('ionicApp', ['ionic']); app.config(function ($stateProvider, $urlRouterProvider) { var home = { url: '/home', templateUrl: 'home.html' }; var about = { url: '/about', templateUrl: 'about.html' }; var help = { url: '/help', templateUrl: 'help.html' }; var inner = { url: '/inner', templateUrl: 'inner.html' }; var tabs = { abstract: true, templateUrl: 'tabs.html', controller: function($scope, $location) { $scope.isAt = function(path) { return new RegExp(path).test($location.path()); }; } } $stateProvider.state('tabs', tabs); $stateProvider.state('tabs.home', home); $stateProvider.state('tabs.about', about); $stateProvider.state('tabs.inner', inner); $stateProvider.state('tabs.help', help); $urlRouterProvider.otherwise('/home'); });