How to bind data in storybook to a component that is loaded in a router outlet?

198 Views Asked by At

I have a BaseComponent that has a router outlet.

<div class="container">
  <app-navigation [state]="navigationState"></app-navigation>
  <router-outlet></router-outlet>
</div> 

When I navigate to a component there is obiously no data bound to it. The current approach I have is

BaseDialog.args = {
// attributes in my ProjectListComponent
    projects: getListOfProjects(),
    projectsToAdd: getListOfProjectsToAdd(),
};

in the base-dialog.component.stories.ts How can I bind these arguments to my component that is loaded in the outlet?

0

There are 0 best solutions below