angular-shepherd icon indicating copy to clipboard operation
angular-shepherd copied to clipboard

requiredElements not working as intended

Open hafnerpw opened this issue 3 years ago • 1 comments

image This is simply not working. I can add any selector I want, the Tour WILL always start. I can't call addSteps but it will ALWAYS display an empty popup. This is very frustrating if the required element is inside ngIf and is only displayed to some users. In my case other users that don't have this element will see an empty popup. Please fix.

hafnerpw avatar Jan 14 '22 12:01 hafnerpw

@w-hafner I believe that is the intended behavior. The documentation is misleading though. You can see here https://github.com/shipshapecode/angular-shepherd/blob/cf2735108b41b6a2af6553acdbf9630b3f2f00c0/projects/shepherd/src/lib/shepherd.service.ts#L96-L106 that if the required elements are not present, it will add a single step to the tour, displaying whatever title and error message you set.

RobbieTheWagner avatar Jan 14 '22 19:01 RobbieTheWagner