Last active
December 22, 2017 18:19
-
-
Save var-bin/b7a7026a683bca634132dc1aa61da839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const appBlog = { | |
name: "blog", | |
url: "/blog", | |
component: "blogComponent", | |
lazyLoad: ($transition$) => { | |
const $ocLazyLoad = $transition$.injector().get("$ocLazyLoad"); | |
// !!! Dynamic import !!! | |
return import(/* webpackChunkName: "blog.module" */ "./pages/blog/blog.module") | |
.then(mod => $ocLazyLoad.load(mod.BLOG_MODULE)) | |
.catch(err => { | |
throw new Error("Ooops, something went wrong, " + err); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment