Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation regarding lazy-loading functionality #114

Open
noherczeg opened this issue Aug 31, 2018 · 1 comment
Open

Missing documentation regarding lazy-loading functionality #114

noherczeg opened this issue Aug 31, 2018 · 1 comment

Comments

@noherczeg
Copy link

At the top of the docs it mentions lazy-loading, but I can't find anything in the docs regarding where and how is this available.

Sample use-cases would be nice as well :-)

@young-steveo
Copy link
Owner

It lazy loads by default; there's no way to disable it.

let count = 0;
bottle.factory('SoLazy', container => {
    count++;
    return {};
});
console.log(count); // 0
bottle.container.SoLazy;
console.log(count); // 1

I guess it would make sense for me to spell that out in the readme; thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants