-1

I have created a simple Astro project, that has now two pages:

  • index.astro
  • dashboard.astro

If I put a console log in the dashboard.astro and load the index page, the script get executed.

How exactly does it work?

Thanks

mijorus
  • 111
  • 1
  • 7
  • This question probably needs some more context to receive a good answer. Could you share the content of `index.astro` and `dashboard.astro`? – swithinbank Nov 28 '22 at 10:52

1 Answers1

1

I suppose that dashboard.astro is your layout In Astrojs you can refer to Layouts with the tag:

<dashboard>
   <p> some html </b>
</dashboard>

If you put a console log in dashboard.astro it is executed every time you use the layout tag