Skip to content

Instantly share code, notes, and snippets.

@var-bin
Created December 21, 2017 10:10
Show Gist options
  • Save var-bin/fda29b1e38e2da8dc6f56f42e98c2720 to your computer and use it in GitHub Desktop.
Save var-bin/fda29b1e38e2da8dc6f56f42e98c2720 to your computer and use it in GitHub Desktop.
const homeAbout = {
name: "home.about",
url: "/about",
component: "homeAboutComponent",
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get("$ocLazyLoad");
return require.ensure([], () => {
// load whole module
let module = require("./about/about.module");
$ocLazyLoad.load(module.HOME_ABOUT_MODULE);
}, "about.module");
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment