<body id="app-test-sample">
app.usePrefix(true);
- test, testSample 실행
app.usePrefix(false);
- app, appTest, appTestSample 실행
app.add({test, testA, testB, testC, testTest});
app.add({site, siteTest, siteTestTest});
import App from 'hwaly-app';
import {test, testA, testB, testC, testTest} from './test';
import {site, siteTest, siteTestTest} from './site';
import common from './common';
import util from './util';
new App({
findId: 'id',
usePrefix: true,
add: {
test, testA, testB, testC, testTest,
site, siteTest, siteTestTest,
common,
util
},
auto: ['common', 'util'],
callback() {
console.log('callback');
}
});
const app = new App();
app.add({test, testA, testB, testC, testTest});
app.add({site, siteTest, siteTestTest});
app.add({common});
app.add({util});
app.findId('id');
// app.findId('data');
app.usePrefix(false);
// app.auto(['common', 'util'])
app.auto('common', 'util');
app.readyAndRun(() => {
console.log('callback');
});
new App()
.add({test, testA, testB, testC, testTest})
.add({site, siteTest, siteTestTest})
.add({common})
.add({util})
.findId('id')
.usePrefix(false)
.auto('common', 'util')
.readyAndRun(() => {
console.log('callback');
});