Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Auxiliary Route Date (outlet) #23

Open
MaxSassen opened this issue Feb 28, 2024 · 0 comments
Open

Getting Auxiliary Route Date (outlet) #23

MaxSassen opened this issue Feb 28, 2024 · 0 comments

Comments

@MaxSassen
Copy link

Description

I couldn't find a way to access the outlet data that is stored in the secondary uri. So when working with Auxiliary Routes im forced to use the angular Activated Route.

  import { ActivatedRoute } from '@angular/router';
  import { RouterRepository } from '@ngneat/elf-ng-router-store';
  
  routerData$ = this.routerStore.selectData();
  outletData$ = this.route.data;
  constructor(   private routerStore: RouterRepository, private route: ActivatedRoute){}

routerData and outletData gives me another result.
example route users/overview(side:create)

Proposed solution

Introduce Outlet into elf-ng-router-store
current output:

{
  router: {
    state: {
      url: '/users/overview(side:create)',
      urlAfterRedirects: '/users/overview(side:create)',
      params: {},
      queryParams: {},
      fragment: null,
      data: {
        application: 'account',
        menu: 'users',
      }
    },
    navigationId: 1
  }
}

requested output:

Introduce Outlet into elf-ng-router-store
current output:

{
router: {
state: {
url: '/users/overview(side:create)',
urlAfterRedirects: '/users/overview(side:create)',
params: {},
queryParams: {},
fragment: null,
data: {
application: 'account',
menu: 'users',
},
outlets: [
{ url: '/create', data: { type: 'human' } }
]
},
navigationId: 1
}
}



### Alternatives considered

any other options :P 

### Do you want to create a pull request?

No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant