Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour with dynamic content #2992

Open
muhammadrasyid-prog opened this issue Oct 1, 2024 · 1 comment
Open

Inconsistent behaviour with dynamic content #2992

muhammadrasyid-prog opened this issue Oct 1, 2024 · 1 comment

Comments

@muhammadrasyid-prog
Copy link

muhammadrasyid-prog commented Oct 1, 2024

is it possible if angle Shepherd initializes the tour with dynamic content, I have tried it but the tour doesn't work even though I have done a console log and the log results appear

` private addDashboardTourSteps() {

  if (!this.tour || this.dataListTour.value.length === 0) {
    console.log("Tour tidak ada atau tidak ada data tour untuk ditambahkan.");
    return;
}

this.dataListTour.value.forEach(tour => {
    console.log(`Menambahkan langkah untuk tour: ${tour.tour_uuid}`);
    console.log(`Konten: ${tour.content}`);
    console.log(`Elemen ID: ${tour.element_id}`);
    console.log(`Penempatan: ${tour.placement}`);
      this.tour?.addSteps([
          {
              id: tour.tour_name, 
              text: tour.content, // Menggunakan konten dari data
              attachTo: {
                  element: tour.element_id, // Menentukan elemen yang dilampirkan
                  on: tour.placement, // Menentukan penempatan
              },
              buttons: [
                  {
                      text: 'Next',
                      action: this.tour?.next, // Tombol untuk melanjutkan ke langkah berikutnya
                  },
              ],
          },
      ]);
  });`
@RobbieTheWagner
Copy link
Member

@muhammadrasyid-prog I am unsure what you are asking. Can you please elaborate and possibly provide a reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants