Skip to content Skip to sidebar Skip to footer

Multiple Abstract Views - Ionic

I am building a project with ionic where there are different views handled by ui-router, that needs be nested together. This is the part of the code where the states of the ui-view

Solution 1:

Check this out:

  $stateProvider

    .state('filters', {
      url: '/filters',
      abstract: true,
      templateUrl: 'templates/filters.html'
    })

    // note this ...
    .state('filters.search', {
      url: '/search',
      abstract: true,
      templateUrl: 'templates/search.html'
    })

    .state('filters.search.locations', {
      url: '/locations',
      views: {
        'tab-locations': {
          templateUrl: 'templates/tab-locations.html',
          controller: 'LocationsCtrl'
        }
      }
    })

    //and so on ...

Post a Comment for "Multiple Abstract Views - Ionic"