VueModules
VueModules is a Vue plugin that tries to achieve some modularization of pages and components
Parameters
Vue
Vueoptions
object Customizations of the plugin
Examples
Vue.use(VueModules, options)
Parameters
options
object Customizations for module
Examples
Vue.registerModule({ resource, module })
Route Handler
Handles a route
Parameters
_route
$1
Object$1.resource
$1.routes
(optional, default[]
)$1.alias
(optional, defaultfalse
)$1.custom.routes
(optional, default[]
)
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') }
]
Adds a alias for a route
In the example the route "/usuario" is a duplication of the route "/user"
Examples
route.alias = [ '/user=/usuario' ]