v0.7.2
New
-
keep-alive
now has experimental support on<router-view>
. -
All transition hooks, including the global before hook, will now be considered synchronous if: (1) The hook doesn't specify any argument; AND (2) The hook doesn't return a promise.
For example, you can now provide a simple, synchronous global before hook:
router.beforeEach(function (/* no argument */) { console.log('route changed!') })
Or a synchronous activate hook:
module.exports = { route: { activate: function (/* no argument */) { console.log('activated!') } } }
Note if the hook specified a
transition
argument, then you still must call a transition method to resolve the hook.Also see updated docs for hook resolution rules.
Fixed
- #187 Route
data
hook now only process the promise sugar syntax (returning an object containing promises) when the returned value is a plain object. This should fix cases where returningthis.$http.get()
usingvue-resource
throws warnings. - Fix
waitForData
not working if using promise sugar syntax indata
hooks. v-link
inexact
mode also matches path with a trailing slash. For example:v-link="{ path: '/a', exact: true }"
will also match/a/
.- Ensure component defined before router installation also gets access to
$route
.