package vue-jsoo

  1. Overview
  2. Docs
type redirect =
  1. | Rd of string
  2. | Rd_name of string

redirect to path or to named route

type props =
  1. | PrBool of bool
  2. | PrObj of Mjs.any
  3. | PrFn of Vue_nav.push_obj -> Mjs.any

props type : boolean, object or function

module Internal : sig ... end

Internal JS module

class type ['data, 'all] route = ['data, 'all] Internal.route

route class type

class type router = Internal.router

router class type

Call router methods

val push : router Mjs.t -> Vue_nav.push_arg -> unit

push to new route

val replace : router Mjs.t -> Vue_nav.push_arg -> unit

replace to new route

val go : router Mjs.t -> int -> unit

go to n next route

val before_hook : router Mjs.t -> (Vue_nav.push_obj -> Vue_nav.push_obj -> (Mjs.any -> unit) -> unit) -> unit

register hook before each navigation

val resolve_hook : router Mjs.t -> (Vue_nav.push_obj -> Vue_nav.push_obj -> (Mjs.any -> unit) -> unit) -> unit

register hook before each navigation confirmation

val after_hook : router Mjs.t -> (Vue_nav.push_obj -> Vue_nav.push_obj -> (Mjs.any -> unit) -> unit) -> unit

register hook after each navigation

type ('a, 'b) route_ml = ('a, 'b) Internal.route_ml = {
  1. path : string;
  2. component : ('a, 'b) Vue_component.component_args option;
  3. children : (Mjs.top, Mjs.top) route Mjs.t list option;
  4. name : string option;
  5. components : ('a, 'b) Vue_component.component_args Mjs.table_cons option;
  6. redirect : redirect option;
  7. alias : string option;
  8. props : props option;
  9. hook : (Vue_nav.push_obj -> Vue_nav.push_obj -> 'b Vue_nav.next) option;
}

route ML object

val empty : string -> ('a, 'b) route_ml

empty route with path

val make : ?version:Version.t -> ?mode:string -> (Mjs.top, Mjs.top) route_ml list -> router Mjs.t

make router from route list

module type Tables_S = sig ... end
module Tables : Tables_S

Functor to fill routes objects

module Route (S : sig ... end) : sig ... end

functor to create a route with a component with typecheck of input data

OCaml

Innovation. Community. Security.