question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to wrap <wizard-step> in own component

See original GitHub issue

Found your library, which seems to be the only one to support Angular 4, so props to you for this awesome thing! I started implementing some wizard steps and wanted to extract the wizard-steps in their own components. However when I did this, the controls didn’t show up in the wizard.

Libraries used:

  • @angular/*: ^4.2.3
  • typescript: 2.4.0
  • ng2-archwizard= ^1.6.0

Consider this example:

<wizard navBarLocation="top" class="width-80">
    <app-wizard-details></app-wizard-details>
/* more steps here */
  <wizard-completion-step title="Conclusion" navigationSymbol="3">
  </wizard-completion-step>
</wizard>

/* app-wizard-details */
<wizard-step  title="First step" navigationSymbol="1">
  <form [formGroup]="detailsForm" >
    <md-input-container>
      <input mdInput formControlName="name" type="text">
    </md-input-container>
    <md-input-container>
      <input mdInput formControlName="offerNumber" type="text">
    </md-input-container>
  </form>
  <button md-raised-button (finalize)="storeDetails()" nextStep>Next</button>
</wizard-step>

What works is the following, but then I cannot make use of your triggers like canExit and stepEnter, since the callbacks might be defined in the child components, not in the root component:

<wizard-step title="First step" navigationSymbol="1">
    <app-wizard-details></app-wizard-details> /* has the <form> tag as root element now */
</wizard-step>

I’d love to see the support of wrapped wizard-steps implemented. That way, you’d be able to build complex wizards without having everything in one single file.

Oh, and: Sorry for not providing a Plunker, for some reason it won’t load your library from unpkg (guess due to proxy issues)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
madoarcommented, Jun 26, 2017

Yes, such an input would be possible. I’m just not sure yet, if I want to add this as a normal @Input or as an directive.

1reaction
madoarcommented, Jun 25, 2017

I think I’ve found a way to do this. As far as I’ve discovered we’ll need both https://angular.io/api/core/InjectionToken and https://github.com/angular/angular/issues/12758 for this. I’ll take a more detailed look at this later next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How I Built A Custom Stepper/Wizard Component Using ...
The Legacy Component​​ You can freely navigate through the content by clicking either the navigation arrows or clicking on a certain step in...
Read more >
Simple Wizard Stepper for your Angular Web Apps
And that's a wrap, folks! We made sure we covered all of the following: Created encapsulated, decoupled components that communicate with one ...
Read more >
Blazor Wizard Overview - Documentation - Telerik
The Wizard component is part of Telerik UI for Blazor, a professional ... The Wizard provides the ability to use the built-in buttons...
Read more >
Using Redux for dynamic wizard
Lastly, wrap the wizard by a component and map your steps. Everytime new step receieved from server it'll dynamically create a new step....
Read more >
Building a step wizard with react native - Dev Genius
When we start creating a UI we must think about it as a set of components that will wrap parts of your interface...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found