package vue-jsoo

  1. Overview
  2. Docs
Binding of Vue_js

Install

Dune Dependency

Authors

Maintainers

Sources

archive?sha=2a338bcccd3cdd4c5b3c488f84b954baa976840e
md5=d8095fc66a530f25abb2c0b994e2e720
sha512=0068240dff39fb5e08a61bb36540b6fffa5d015abb7b4f5eb6a00425f8d860d7f73493d63779b6cc269680192cdab4c3dc662c5631ae1e195f6f58e92815f4e2

doc/vue-jsoo.router/Vue_router/index.html

Module Vue_routerSource

Create router object

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

redirect to path or to named route

Sourcetype push_obj = {
  1. pu_path : string option;
  2. pu_name : string option;
  3. params : (string * string) list option;
  4. query : (string * string) list option;
}

route argument object for the router methods

Sourceval empty_arg : push_obj

empty route object argument

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

props argument can be a bool, and object or a function

Sourcemodule Internal : sig ... end

Internal module

router class type

Call router methods

Sourcetype push_arg =
  1. | PStr of string
  2. | PObj of push_obj

route argument can be a string or an object

Sourceval push : router -> push_arg -> unit

push to new route

Sourceval replace : router -> push_arg -> unit

replace to new route

Sourceval go : router -> int -> unit

go to n next route

Sourceval before_hook : router -> (push_obj -> push_obj -> (unit -> unit) -> unit) -> unit

register hook before each navigation

Sourceval resolve_hook : router -> (push_obj -> push_obj -> (unit -> unit) -> unit) -> unit

register hook before each navigation confirmation

Sourceval after_hook : router -> (push_obj -> push_obj -> (unit -> 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) Internal.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 : (push_obj -> push_obj -> (unit -> unit) -> unit) option;
}

route object

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

empty route with path

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

make router from route list

Sourcemodule type Tables_S = sig ... end
OCaml

Innovation. Community. Security.