Skip to content

Commit

Permalink
Add contains method to guide serve
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schiller committed Mar 17, 2022
1 parent 7f670ac commit 5e11eb0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/ngx-tour-guide/src/lib/ngx-tour-guide.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ export class NgxTourGuideService {
delete this.registry[name];
}

/**
* Checks whether a tour with given name is registered
* @param name tour name
*/
public contains(name: string) {
return !!this.registry[name];
}

/**
* Start a tour.
* This will throw if another tour is currently running.
Expand Down

0 comments on commit 5e11eb0

Please sign in to comment.