Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .config(function($stateProvider, $urlRouterProvider) {
- // Ionic uses AngularUI Router which uses the concept of states
- // Learn more here: https://github.com/angular-ui/ui-router
- // Set up the various states which the app can be in.
- // Each state's controller can be found in controllers.js
- $stateProvider
- // setup an abstract state for the tabs directive
- .state('tab', {
- url: "/tab",
- abstract: true,
- templateUrl: "templates/tabs.html"
- })
- // Each tab has its own nav history stack:
- .state('tab.dash', {
- url: '/dash',
- views: {
- 'tab-dash': {
- templateUrl: 'templates/tab-dash.html',
- controller: 'DashCtrl'
- }
- }
- })
- .state('tab.penis', {
- url: '/product/:slug',
- views: {
- 'tab-product': {
- templateUrl: 'templates/tab-products.html',
- controller: 'ProductsCtrl'
- }
- }
- })
- .state('tab.products', {
- url: '/products',
- views: {
- 'tab-products': {
- templateUrl: 'templates/tab-products.html',
- controller: 'ProductsCtrl'
- }
- }
- })
- .state('tab.about', {
- url: '/about',
- views: {
- 'tab-about': {
- templateUrl: 'templates/tab-about.html',
- controller: 'AboutCtrl'
- }
- }
- });
- // if none of the above states are matched, use this as the fallback
- $urlRouterProvider.otherwise('/tab/dash');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement