Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import List from './todo/List'
import Form from './todo/Form'
import AddCategory from './category/Add'
import EditCategory from './category/Edit'
import {router} from 'san-router'
router.add({rule: '/', Component: List, target: '#app'});
router.add({rule: '/todos/category/:category', Component: List, target: '#app'});
router.add({rule: '/add', Component: Form, target: '#app'});
router.add({rule: '/edit/:id', Component: Form, target: '#app'});
router.add({rule: '/category/add', Component: AddCategory, target: '#app'});
router.add({rule: '/category/edit', Component: EditCategory, target: '#app'});
// start
router.start();
import List from './todo/List'
import Form from './todo/Form'
import AddCategory from './category/Add'
import EditCategory from './category/Edit'
import {router} from 'san-router'
router.add({rule: '/', Component: List, target: '#app'});
router.add({rule: '/todos/category/:category', Component: List, target: '#app'});
router.add({rule: '/add', Component: Form, target: '#app'});
router.add({rule: '/edit/:id', Component: Form, target: '#app'});
router.add({rule: '/category/add', Component: AddCategory, target: '#app'});
router.add({rule: '/category/edit', Component: EditCategory, target: '#app'});
// start
router.start();
import List from './todo/List'
import Form from './todo/Form'
import AddCategory from './category/Add'
import EditCategory from './category/Edit'
import {router} from 'san-router'
router.add({rule: '/', Component: List, target: '#app'});
router.add({rule: '/todos/category/:category', Component: List, target: '#app'});
router.add({rule: '/add', Component: Form, target: '#app'});
router.add({rule: '/edit/:id', Component: Form, target: '#app'});
router.add({rule: '/category/add', Component: AddCategory, target: '#app'});
router.add({rule: '/category/edit', Component: EditCategory, target: '#app'});
// start
router.start()
});
router.add({rule: '/', Component: Home});
router.add({rule: '/tag/:tag', Component: Home});
router.add({rule: '/my-feed', Component: Home});
router.add({rule: '/login', Component: Login});
router.add({rule: '/register', Component: Register});
router.add({rule: '/settings', Component: Setting});
router.add({rule: '/profile/:user', Component: ProfileMy});
router.add({rule: '/profile/:user/favorites', Component: ProfileFavorited});
router.add({rule: '/editor', Component: ArticleEdit});
router.add({rule: '/editor/:slug', Component: ArticleEdit});
router.add({rule: '/article/:slug', Component: ArticleView});
router.start();
}
let doc = new Doc();
doc.attach(document.getElementById('content'));
}).catch(e => {
that.handleError(e);
});
}
that.hlCode();
}
this.nextTick(() => {
if (window.document.documentElement.scrollTop > 110) {
window.scroll(0, 110);
}
});
});
router.start();
}
init: function () {
router.start();
}
};
init: function () {
router.start();
}
};