v0.7.2
New
-
keep-alivenow 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
transitionargument, then you still must call a transition method to resolve the hook.Also see updated docs for hook resolution rules.
Fixed
- #187 Route
datahook 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-resourcethrows warnings. - Fix
waitForDatanot working if using promise sugar syntax indatahooks. v-linkinexactmode 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.