wrong icon in material angular stepper
up vote
1
down vote
favorite
I'm trying to put a edit icon when a state is "address", but the icon is the must of the first state (home).
I try:
First step:
<ng-template matStepperIcon="edit">
<mat-icon>home</mat-icon>
</ng-template>
<mat-step label="Antes de começar..." state="home">
..........
Second step:
<ng-template matStepperIcon="address">
<mat-icon>edit</mat-icon>
</ng-template>
<mat-step label="Dados do seu pet..." [stepControl]="secondFormGroup" state="address">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
</div>
This is showing:
The second step must be a edit icon but have the icon of the first step why?
angular material
add a comment |
up vote
1
down vote
favorite
I'm trying to put a edit icon when a state is "address", but the icon is the must of the first state (home).
I try:
First step:
<ng-template matStepperIcon="edit">
<mat-icon>home</mat-icon>
</ng-template>
<mat-step label="Antes de começar..." state="home">
..........
Second step:
<ng-template matStepperIcon="address">
<mat-icon>edit</mat-icon>
</ng-template>
<mat-step label="Dados do seu pet..." [stepControl]="secondFormGroup" state="address">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
</div>
This is showing:
The second step must be a edit icon but have the icon of the first step why?
angular material
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to put a edit icon when a state is "address", but the icon is the must of the first state (home).
I try:
First step:
<ng-template matStepperIcon="edit">
<mat-icon>home</mat-icon>
</ng-template>
<mat-step label="Antes de começar..." state="home">
..........
Second step:
<ng-template matStepperIcon="address">
<mat-icon>edit</mat-icon>
</ng-template>
<mat-step label="Dados do seu pet..." [stepControl]="secondFormGroup" state="address">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
</div>
This is showing:
The second step must be a edit icon but have the icon of the first step why?
angular material
I'm trying to put a edit icon when a state is "address", but the icon is the must of the first state (home).
I try:
First step:
<ng-template matStepperIcon="edit">
<mat-icon>home</mat-icon>
</ng-template>
<mat-step label="Antes de começar..." state="home">
..........
Second step:
<ng-template matStepperIcon="address">
<mat-icon>edit</mat-icon>
</ng-template>
<mat-step label="Dados do seu pet..." [stepControl]="secondFormGroup" state="address">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
</div>
This is showing:
The second step must be a edit icon but have the icon of the first step why?
angular material
angular material
asked Nov 10 at 17:26
Renato Veronese
317
317
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You should be overriding the home
icon, change matStepperIcon="address"
to the following.
<ng-template matStepperIcon="home">
<mat-icon>edit</mat-icon>
</ng-template>
Revision
You will need to control the icon override by state, please review the phone
and chat
states in the below material stackblitz example.
https://stackblitz.com/angular/onvqbjrynkj?file=app%2Fstepper-states-example.html
Revision 2
You could also use *ngIf based on index.
<ng-template matStepperIcon="edit" let-index="index">
<mat-icon *ngIf="index == 0">home</mat-icon>
<mat-icon *ngIf="index == 1">edit</mat-icon>
</ng-template>
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You should be overriding the home
icon, change matStepperIcon="address"
to the following.
<ng-template matStepperIcon="home">
<mat-icon>edit</mat-icon>
</ng-template>
Revision
You will need to control the icon override by state, please review the phone
and chat
states in the below material stackblitz example.
https://stackblitz.com/angular/onvqbjrynkj?file=app%2Fstepper-states-example.html
Revision 2
You could also use *ngIf based on index.
<ng-template matStepperIcon="edit" let-index="index">
<mat-icon *ngIf="index == 0">home</mat-icon>
<mat-icon *ngIf="index == 1">edit</mat-icon>
</ng-template>
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
|
show 1 more comment
up vote
2
down vote
accepted
You should be overriding the home
icon, change matStepperIcon="address"
to the following.
<ng-template matStepperIcon="home">
<mat-icon>edit</mat-icon>
</ng-template>
Revision
You will need to control the icon override by state, please review the phone
and chat
states in the below material stackblitz example.
https://stackblitz.com/angular/onvqbjrynkj?file=app%2Fstepper-states-example.html
Revision 2
You could also use *ngIf based on index.
<ng-template matStepperIcon="edit" let-index="index">
<mat-icon *ngIf="index == 0">home</mat-icon>
<mat-icon *ngIf="index == 1">edit</mat-icon>
</ng-template>
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
|
show 1 more comment
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You should be overriding the home
icon, change matStepperIcon="address"
to the following.
<ng-template matStepperIcon="home">
<mat-icon>edit</mat-icon>
</ng-template>
Revision
You will need to control the icon override by state, please review the phone
and chat
states in the below material stackblitz example.
https://stackblitz.com/angular/onvqbjrynkj?file=app%2Fstepper-states-example.html
Revision 2
You could also use *ngIf based on index.
<ng-template matStepperIcon="edit" let-index="index">
<mat-icon *ngIf="index == 0">home</mat-icon>
<mat-icon *ngIf="index == 1">edit</mat-icon>
</ng-template>
You should be overriding the home
icon, change matStepperIcon="address"
to the following.
<ng-template matStepperIcon="home">
<mat-icon>edit</mat-icon>
</ng-template>
Revision
You will need to control the icon override by state, please review the phone
and chat
states in the below material stackblitz example.
https://stackblitz.com/angular/onvqbjrynkj?file=app%2Fstepper-states-example.html
Revision 2
You could also use *ngIf based on index.
<ng-template matStepperIcon="edit" let-index="index">
<mat-icon *ngIf="index == 0">home</mat-icon>
<mat-icon *ngIf="index == 1">edit</mat-icon>
</ng-template>
edited Nov 10 at 18:49
answered Nov 10 at 17:57
Marshal
947313
947313
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
|
show 1 more comment
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
I change to the following code, but the icon still is a home in a second step
– Renato Veronese
Nov 10 at 18:00
please see revision
– Marshal
Nov 10 at 18:33
please see revision
– Marshal
Nov 10 at 18:33
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
I just tried this too.. Changed the <mat-step state="home" label="Antes de começar..."> and <mat-step state="address" label="Dados do seu pet..." [stepControl]="secondFormGroup"> and before the </mat-step> i put: <ng-template matStepperIcon="home"> <mat-icon>home</mat-icon> </ng-template> <ng-template matStepperIcon="address"> <mat-icon>edit</mat-icon> </ng-template>
– Renato Veronese
Nov 10 at 18:37
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
still dont work. i see that in this tutorial they import MAT_STEPPER_GLOBAL_OPTIONS from '@angular/cdk/stepper'; but if i try to import, i receive: [ts] Module '"c:/Users/renaotpls/Documents/git clone/cade-meu-pet-frontend/node_modules/@angular/cdk/stepper"' has no exported member 'MAT_STEPPER_GLOBAL_OPTIONS'. my angular material is actualy in the latest version. i do no what i have to do.
– Renato Veronese
Nov 10 at 18:38
1
1
working in revision 2
– Renato Veronese
Nov 10 at 18:56
working in revision 2
– Renato Veronese
Nov 10 at 18:56
|
show 1 more comment
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241553%2fwrong-icon-in-material-angular-stepper%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown