Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

jbbn/vue-modules

Repository files navigation

Docs

Table of Contents

VueModules

VueModules

VueModules is a Vue plugin that tries to achieve some modularization of pages and components

install

Parameters

  • Vue Vue
  • options object Customizations of the plugin

Examples

Vue.use(VueModules, options)

registerModule

Parameters

  • options object Customizations for module

Examples

Vue.registerModule({ resource, module })

routeHandler

Route Handler

Handles a route

Parameters

  • _route
  • $1 Object
    • $1.resource
    • $1.routes (optional, default [])
    • $1.alias (optional, default false)
    • $1.custom.routes (optional, default [])

_route

Override a page/route

In the example the route named as "user" will load the "MyCustomUserPage" instead of the defined in the module

Examples

customRoutes = [
  { name: 'user', component: require('./MyCustomUserPage') }
]

alias

Adds a alias for a route

In the example the route "/usuario" is a duplication of the route "/user"

Examples

route.alias = [ '/user=/usuario' ]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published