-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
feature requestfixed on 4.xThis issue has been already fixed on the v4 but exists in v3This issue has been already fixed on the v4 but exists in v3needs RFCThis feature request needs to go through the RFC process to gather more informationThis feature request needs to go through the RFC process to gather more information
Description
What problem does this feature solve?
This feature would address many requests seen in relation to having greater control over applications history, stack management, initial route, and a few others.
There are several supported history modes. My proposal is to allow mode
option accept an instance of a class that implements History API.
Instantiation would look like:
import { AbstractHistory } from 'vue-router'
class CustomHistory extends AbstractHistory {
...
}
const customHistory = new CustomHistory()
const router = new VueRouter({
mode: customHistory,
routes: [...]
})
This would give great flexibility to developers and would allow further integrations of cool features such as keeping reactive history with vuex
.
What does the proposed API look like?
mode
option would accept String
or an instance of AbstractHistory
. Internally, if an instance is detected, the history manipulation would happen through it.
filinov, ardoramor, rigor789, radeva, hxlniada and 5 more
Metadata
Metadata
Assignees
Labels
feature requestfixed on 4.xThis issue has been already fixed on the v4 but exists in v3This issue has been already fixed on the v4 but exists in v3needs RFCThis feature request needs to go through the RFC process to gather more informationThis feature request needs to go through the RFC process to gather more information