package vue-jsoo

  1. Overview
  2. Docs

Module Vue_routerSource

Sourcetype redirect =
  1. | Rd of string
  2. | Rd_name of string

redirect to path or to named route

Sourcetype 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

Sourcemodule Internal : sig ... end

Internal JS module

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

route class type

router class type

Call router methods

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

push to new route

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

replace to new route

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

go to n next route

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

register hook before each navigation

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

register hook before each navigation confirmation

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

register hook after each navigation

Sourcetype ('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

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

empty route with path

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

make router from route list

Sourcemodule type Tables_S = sig ... end

Functor to fill routes objects

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

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

OCaml

Innovation. Community. Security.