Created
July 28, 2015 19:18
-
-
Save popcorn245/7a7a6aaa39db41bd8c56 to your computer and use it in GitHub Desktop.
Standard Ionic Router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config(function($stateProvider, $urlRouterProvider) { | |
$stateProvider | |
.state('login', { | |
url: '/login', | |
templateUrl: 'html/login.html', | |
controller: 'Login' | |
}) | |
.state('tab', { | |
url: "/tab", | |
abstract: true, | |
templateUrl: "html/tabs.html" | |
}) | |
.state('tab.dashboard', { | |
url: '/dashboard', | |
views: { | |
'tab-dashboard': { | |
templateUrl: 'html/tab-dashboard.html', | |
controller: 'Dashboard' | |
} | |
} | |
}) | |
.state('tab.search', { | |
url: '/search', | |
views: { | |
'tab-search': { | |
templateUrl: 'html/tab-search.html', | |
controller: 'Search' | |
} | |
} | |
}); | |
// if none of the above states are matched, use this as the fallback | |
$urlRouterProvider.otherwise('/login'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment