How do pass parameter on Tabs

the cache false works, when you are going into a level 3 deep nested state (Thanks I’ve been having a headache with this)
this forces the OID to reset everytime the tabs abstract state is accessed, without this the ID would be the same everytime, (this is what cause my headache).

ui-sref="tabs-organisations.info({OID: id})"

and then you can just call any tab state with ui-sref

ui-sref="tabs-organisations.info"
ui-sref="tabs-organisations.addresses"

.state('organisations.home', {
            url: '/home',
            views: {
                'entitiesContent': {
                    templateUrl: 'templates/organisations/organisations.html',
                    controller: 'OrganisationsCtrl'
                }
            }
        })
        .state('tabs-organisations', {
            cache: false,
            abstract: true,
            parent: 'organisations',
            url: '/tab/:OID',
            views: {
                'entitiesContent': {
                    templateUrl: 'templates/tabs.html',
                    controller: function ($scope, $log, $stateParams, OFactory) {
                        $log.log($stateParams.OID);
                        $scope.entityID = $stateParams.OID;
                    }
                }
            }
        })
        .state('tabs-organisations.info', {
            url: '/info',
            views: {
                'tab-info': {
                    templateUrl: 'templates/organisations/info.html',
                    controller: 'OrganisationInfoCtrl'
                }
            }
        })
1 Like