Created
May 5, 2020 23:17
-
-
Save luizcanet/ac7914a2916d4af974a9146acc8ae6c4 to your computer and use it in GitHub Desktop.
Router Methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.addRoute({ | |
path: '/section/:param1/:param2/*', | |
tagName: 'section-list' | |
}) | |
// When location is /section/book/50/any-string | |
// and route path is /section/:param1/:param2/* | |
let params = router.getParams() | |
// params will be equal { param1: 'book', param2: '50' } | |
Router.goTo('/categories') // will change location path to /categories |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment