0

Getting 'expressionchangedafterithasbeencheckederror: expression has changed after it was checked. previous value: 'stepcontrol: undefined'. current value: 'stepcontrol: [object object]' in the line where I used child component's form references as stepcontrol value.

Have any solution for this one?

stackblitz link

Tried to show the horizontal and vertical stepper depending on the screen resolution. Because of this error, on changing the resolution it does not move to the last step.

Jobelle
  • 2,717
  • 1
  • 15
  • 26
  • I don't see any errors in the console when opening the stackblitz link. Is there any additional information you can provide? – Derek Schmid Feb 02 '19 at 19:10
  • Move till the country edit step then resize to mobile size. Then it will not moving to the country step as it have the above mentioned error. – Jobelle Feb 02 '19 at 19:18
  • Unfortunately I am unable to make this error occur. I fill out the form until the country edit step, in fact I have tried filling it out to all different steps. Then I resize to mobile and I see the stepper move from horizontal to vertical, but there are no errors in the console. I have noticed that sometimes resizing to mobile causes the stepper to move back to the first step, but still no errors. – Derek Schmid Feb 02 '19 at 19:46
  • Can you please check in chrome? – Jobelle Feb 02 '19 at 19:51
  • Unfortunately Chrome won't actually switch it to mobile mode. I resized to minimum width and it stayed as a horizontal stepper. I'm using Chrome Version 71.0.3578.98 (Official Build) (64-bit) – Derek Schmid Feb 02 '19 at 20:12
  • can you add the link to the stackblitz editor instead of just the app?` – Jota.Toledo Feb 02 '19 at 20:33
  • @Aswathy It's not reproducible for me either, but this error actually shouldn't affect behavior somehow, the only thing is that changes to model weren't rendered to the UI, but they should be aligned during next change detection. – Amir Arbabian Feb 02 '19 at 20:34
  • @Jota Toledo updated the link – Jobelle Feb 02 '19 at 23:45
  • @DerekSchmid developers.google.com/web/tools/chrome-devtools/device-mode – Jobelle Feb 03 '19 at 05:55
  • Sorry for the delay, I have been relocating my house. It looks like maybe you have been making changes to the StackBlitz? There is now an error, because your code on line 42 of stepper-overview-example.ts is throwing an error. I think I know what might be causing your original problem though. When you resize, the components attached to the `formGroup` are changing, which is likely causing some of the odd behavior. If I get time, I will try and create a separate demo on StackBlitz. – Derek Schmid Feb 05 '19 at 14:41
  • @Derek Thank you – Jobelle Feb 08 '19 at 14:03

0 Answers0