barbajs / barba

Create badass, fluid and smooth transitions between your website’s pages

Home Page:https://barba.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for multiple `namespace` in `Views`

xavierfoucrier opened this issue · comments

The current syntax for View doesn't support more that a single namespace.

It would be nice to allow multiple namespaces in order to simplify code that run for a specific slot of Views, like:

barba.init({
  views: [{
    namespace: [
      'index',
      'contact'
    ],
    beforeLeave(data) {
      // do something before leaving `index` or `contact` namespaces
    }
  }]
});