Updated router / readme
This commit is contained in:
parent
ad204a6b2f
commit
766ccccdb6
2 changed files with 6 additions and 18 deletions
22
README.md
22
README.md
|
|
@ -1,19 +1,7 @@
|
|||
# fmg-funnel-2021
|
||||
### Fix My Glass Vue Project
|
||||
---
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
This Repository is for Fix My Glass front end Vue and documentation associated with it.
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
#### Routing
|
||||
We are using [Vue Router](https://next.router.vuejs.org/) 4.x for our front end routing. We our using a runtime dynamic routing solution. Some more information about dynamic routing can be found on the [official Vue Router documentation](https://next.router.vuejs.org/guide/advanced/dynamic-routing.html). Our routing solution is as outlined below:
|
||||
|
|
@ -21,7 +21,7 @@ const routes = [
|
|||
beforeEnter(to, from, next) {
|
||||
|
||||
// If we have no query string, or we don't have the FmgPage query string.
|
||||
if (Object.keys(to.query).length === 0 || to.query.fmgPage === undefined) {
|
||||
if (to.query.fmgPage === undefined) {
|
||||
RetainStructureAndGoTo404(to, next);
|
||||
} else {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue