storybook, angular, and non-json input

Viewed 97

I try to create a storie with storybook for my angular component.

My issue is my angular component have an @Input() to an object who is very complexe, and cannot be convert to json ( recursive dependence, methodes, the whole stuff).

For an unknow reason, the story fail to create, but work if I pass a less complex object as an input.

Any Idea?

@Component({
  selector: 'app-complex-view',
  template: `...`
})
export class ComplexViewComponent {
  @Input()
  public complex: Complex;





export const ComplexStory: Story<ComplexViewComponent> = args => ({
  props: {
    ...args,
    complex: new Complex()
  },
  template:'<app-complex-view [complex]=complex></app-complex-view>',
});
0 Answers
Related