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
I have created a simple Astro project, that has now two pages:
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
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