mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
23 lines
528 B
JavaScript
23 lines
528 B
JavaScript
import { module } from 'modujs';
|
|
import modularLoad from 'modularload';
|
|
|
|
export default class extends module {
|
|
constructor(m) {
|
|
super(m);
|
|
}
|
|
|
|
init() {
|
|
const load = new modularLoad({
|
|
enterDelay: 0,
|
|
transitions: {
|
|
customTransition: {}
|
|
}
|
|
});
|
|
|
|
load.on('loaded', (transition, oldContainer, newContainer) => {
|
|
this.call('destroy', oldContainer, 'app');
|
|
this.call('update', newContainer, 'app');
|
|
});
|
|
}
|
|
}
|