forked from jamiebuilds/marionette-wires
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
48 lines (36 loc) · 945 Bytes
/
main.js
File metadata and controls
48 lines (36 loc) · 945 Bytes
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
46
47
48
import './plugins';
import Backbone from 'backbone';
import $ from 'jquery';
import Application from './application/application';
import ModalService from './modal/service';
import HeaderService from './header/service';
import FlashesService from './flashes/service';
import IndexRouter from './index/router';
import ColorsRouter from './colors/router';
import BooksRouter from './books/router';
let app = new Application();
ModalService.setup({
container: app.layout.overlay
});
HeaderService.setup({
container: app.layout.header
});
FlashesService.setup({
container: app.layout.flashes
});
$(document).ajaxError(() => {
FlashesService.add({
type: 'danger',
title: 'Server Error'
});
});
app.index = new IndexRouter({
container: app.layout.content
});
app.colors = new ColorsRouter({
container: app.layout.content
});
app.books = new BooksRouter({
container: app.layout.content
});
Backbone.history.start();