forked from khoanguyen123/aurelia-ui-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
45 lines (40 loc) · 1.21 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import {Aurelia} from "aurelia-framework";
import {UIValidationStrategy} from "./framework/index";
export function configure(aurelia:Aurelia) {
aurelia.use
.standardConfiguration()
// .developmentLogging()
.feature('./framework', function (config) {
// AppKey for local/session storage key prefix
config.App.Key = 'App';
// Application Title
config.App.Title = 'Aurelia UI Framework';
// Application Version
config.App.Version = '2.00';
// HTTPClient Base API URL
config.Http.BaseUrl = './';
// HTTPClient Extra Headers
config.Http.Headers = {
'X-API-VERSION': '2'
};
// HTTPClient Send Basic Authorization Header
config.Http.AuthorizationHeader = true;
})
.plugin('aurelia-validation', function (config) {
config.useViewStrategy(new UIValidationStrategy());
});
aurelia.start()
.then(a=>{
return a.setRoot('./src/app.js');
})
.then(()=>{
var splash = window.document.querySelector('.ui-splash');
splash.classList.add('animate');
setTimeout(()=>{
splash.parentElement.removeChild(splash);
}, 1000);
})
.catch(e=>{
console.log(e);
});
}