MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / resolveAsyncComponent

Function resolveAsyncComponent

06.Router/basic/js/vue-router.js:830–847  ·  view source on GitHub ↗
(handler, cb)

Source from the content-addressed store, hash-verified

828 var resolver = undefined;
829
830 function resolveAsyncComponent(handler, cb) {
831 if (!resolver) {
832 resolver = {
833 resolve: exports$1.Vue.prototype._resolveComponent,
834 $options: {
835 components: {
836 _: handler.component
837 }
838 }
839 };
840 } else {
841 resolver.$options.components._ = handler.component;
842 }
843 resolver.resolve('_', function (Component) {
844 handler.component = Component;
845 cb(Component);
846 });
847 }
848
849 /**
850 * Map the dynamic segments in a path to params.

Callers 1

canActivateFunction · 0.85

Calls 1

cbFunction · 0.70

Tested by

no test coverage detected