Start adding modularjs & modularload, start updating readme, update html files, change jquery cdn, remove IE from babelrc
This commit is contained in:
22
assets/scripts/modules/load.js
Normal file
22
assets/scripts/modules/load.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { module } from 'modujs';
|
||||
import modularLoad from 'modularload';
|
||||
|
||||
export default class extends module {
|
||||
constructor(m) {
|
||||
super(m);
|
||||
}
|
||||
|
||||
init() {
|
||||
const load = new modularLoad({
|
||||
enterDelay: 0
|
||||
});
|
||||
|
||||
load.on('loaded', (transition, oldContainer, newContainer) => {
|
||||
this.call('destroy', oldContainer, 'app');
|
||||
})
|
||||
|
||||
load.on('ready', (transition, newContainer) => {
|
||||
this.call('update', newContainer, 'app');
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user