Comments (4)
The wizard currently doesn't support your approach out of the box.
There are some things you can try to get it working:
- the first problem you're facing is, that your wizard doesn't contain a step during initialization. This can be solved by a
*ngIf
, which you can add to yourwizard
, that only adds the wizard to the dom, if it contains at least one step. - the second problem, I see is, that your approach enables the user to change the contained steps in the wizard while he's using it right?
This leads to a problem, namely that the user is able to remove an already completed step or adds a step before his currently entered step. This is especially problematic, because the wizard currently does no adjustment to its state, if it detects changes to the contained wizard steps.
This means, that if you're let's say in step 3 and you remove step 2, the wizard will automatically show you step four, while step 3 hasn't even been completed yet. The current solution to this problem would be to only show the wizard if all steps have been decided, that should be contained in the wizard. Afterwards it should be impossible for the user to add or remove some steps.
If you want to provide a lasting solution for this issue feel free to do so.
For the first problem it would be required to add some checks, that allow empty wizards.
For the second problem we would need an observer for the QueryList<WizardStep>
in https://github.com/madoar/ng2-archwizard/blob/master/src/components/wizard.component.ts, that checks for changes inside the list and modifies the underlying model accordingly.
from angular-archwizard.
Hi.. please show some code for first problem. Since i'm using wizard
tag in one component and wizard-step
in another component and included in first component's html, Its showing same error. It will be a initialization problem. Show me some sample code of *ngIf
.
from angular-archwizard.
@vinayistar I imagine something like
<aw-wizard *ngIf="steps.length > 0">
</aw-wizard>
should work.
The above used syntax is for version 3.0.0
.
from angular-archwizard.
The second point has been implemented in angular-archwizard
. The removal and addition of wizard steps after initialization is (now) possible. When doing this it is important to watch out that only steps after the current step are added and removed, otherwise it is possible that the state of the wizard is broken and the wrong step is shown or the navigation doesn't function correctly anymore.
from angular-archwizard.
Related Issues (20)
- Error: node_modules/angular-archwizard/archwizard.module.d.ts:8:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s). HOT 1
- Issue with using angular-archwizard in lazy loaded libraries HOT 4
- Skip step or conditional step HOT 1
- Angular 12 Support
- Unable to step to next page with [canExit] HOT 1
- Programmatically navigation HOT 4
- awSelectedStep condition HOT 5
- "selected-step.directive.spec.ts" appears to be outdated
- Dinamically Add Nested Step
- disableNavigationBar doesn't disable navigation
- Show checkmark on step complete on nested wizard
- Is this module is still supported? HOT 3
- angular archwizard dynamic hashtag in ngFor
- Angular Archwizard is not working inside ng bootstrap modal HOT 1
- DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. HOT 2
- Passe a fuction to [canExit]
- How to make step title lowercase?
- Inquiry Regarding Angular Version Update for angular-archwizard Package from ngcc to Ivy HOT 1
- 'ArchwizardModule' does not appear to be an NgModule class. HOT 4
- The Angular 17 version is not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-archwizard.