Hello,
I have a problem with adding and removing scripts on some pages. I suspect this has to do with data-barba-namespace but these scripts are outside of data-barba = "container".
I have no idea how to add them if I am on the right page or delete them if I am off this page.
Ps. it's not about functions, but about files e.g.
`
Hi @ProdesignerAgency,
For now, as specified in the documentation:
_Be aware, everything inside of this wrapper and outside of the container will not be updated by Barba_
Meaning it would not be updated as well, because the page is not fully reloaded when using barba.
So, if you want to add scripts on some pages, you will need to use barba View to target the right page and manipulate the DOM to create the <script> tags and load your scripts.
Note that in a near future, barba will be able to update the <head>, depending on the view you are entering/leaving/etc.., with the @barba/head module. :+1:
OK thank You :)
So, if you want to add scripts on some pages, you will need to use barba View to target the right page and manipulate the DOM to create the