<title>yox-demo</title>
<!--[if IE]>
<script src="https://cdn.bootcss.com/es6-promise/4.1.1/es6-promise.auto.min.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/es5-shim/4.5.13/es5-shim.min.js"></script>
<script src="https://cdn.bootcss.com/es5-shim/4.5.13/es5-sham.min.js"></script>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!--[if lt IE 8]>
<script src="https://cdn.bootcss.com/json3/3.3.3/json3.min.js"></script>
<![endif]-->
</head>
<body>
<div id="app"></div>
<script src="./yox.js"></script>
<script src="./yox-router.js"></script>
<script>
Yox.use(YoxRouter)
var router = new YoxRouter.Router({
el: Yox.dom.find('#app'),
routes: [
{
path: '',
name: 'header_tpl',
component: {
template: ['<div class="header">', '<h1>header</h1>', '</div>'].join(
''
),
},
},
],
route404: {
path: '404',
name: '404',
component: {
template: '<div>not found</div>',
},
},
})
router.start()
</script>
</body>