index.js 444 Bytes
Newer Older
1 2 3
import dva from 'dva';
import 'moment/locale/zh-cn';
import models from './models';
afc163's avatar
afc163 committed
4
import './polyfill';
5
import './g2';
ddcat1115's avatar
ddcat1115 committed
6
// import { browserHistory } from 'dva/router';
7 8 9 10 11 12 13 14 15 16
import './index.less';

// 1. Initialize
const app = dva({
  // history: browserHistory,
});

// 2. Plugins
// app.use({});

ddcat1115's avatar
ddcat1115 committed
17
// 3. Model move to router
18 19 20 21 22 23 24 25 26
models.forEach((m) => {
  app.model(m);
});

// 4. Router
app.router(require('./router'));

// 5. Start
app.start('#root');