Views
Views allows you to have some logic related to the content of a namespace
.
It’s a good place to init or destroy things, making the code run in a confined place.
They use a subset of base hooks
.
Summary
Syntax
1 | barba.init({ |
Keep in mind that a view is always related to a unique namespace.
Programmatic use
In some cases, you may want to programmatically call a View
inside your code, this is possible since Barba store all your views by namespace
internally.
1 | // return all views as a Map |