miraxes / angular-custom-tour

Custom tour hints
24 stars 12 forks source link

selector already registered! #15

Closed ng-model closed 6 years ago

ng-model commented 6 years ago

here I'm highlighting the checkbox, it works fine for the first time. If I try to route to this page later, the following error pops in the console which doesn't allow the service call. Is there a way to unregister the selector after the tour. Thanks. image

miraxes commented 6 years ago

@madurimanoj You can not unregister steps for now. :( But I can suggest you to use method startAt(stepId: number) from Service. Something like

if (firstTimeInit) {
  this.hintService.initialize();
} else {
  this.hintService.startAt(0);
}
ng-model commented 6 years ago

@miraxes thanks for your answer, it solves regarding highlighting the startAt(1) but not the selector already registered error in console. This error is the blocker for other operations. I'm using tour on dataTables header.

ritesh-mittal commented 6 years ago

I am also facing the same issue. Please help.

ng-model commented 6 years ago

@ritmittal2682 It won't work cause, it doesn't support for multiple components that's why he's suggesting to use public startAt(stepId: number) See --> Multiple Components support? #2 NO OFFENSE @miraxes and Thanks.

saurabhkjha commented 6 years ago

I am using inside *ngIf - else , as soon as i toggle between template the same error is coming like "selector already registered!"