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

positionElements function not available since v3.0.0 #2632

Closed
jingzhang opened this issue Aug 21, 2018 · 2 comments
Closed

positionElements function not available since v3.0.0 #2632

jingzhang opened this issue Aug 21, 2018 · 2 comments

Comments

@jingzhang
Copy link

Bug description:

Prior to 3.0.0, we can use positionElements like this:

import { positionElements } from '@ng-bootstrap/ng-bootstrap/util/positioning';

But now it causes build error:


Module not found: Error: Can't resolve '@ng-bootstrap/ng-bootstrap/util/positioning' in '......'

Seems it's because this function is not exported in @ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap.umd.js

Is it by design to not export it? If not it would be nice to have it back.

Thanks.

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 6.1.3

ng-bootstrap: 3.0.0

Bootstrap: 4.1.3

@pkozlowski-opensource
Copy link
Member

Sorry, we are not ready to open it up as the public API hence it is not exported. So it is by design.
We can consider opening it up in the future, but this is not priority right now. As such your best option is to copy this service over to your project. I know that this is not ideal, but this is the best option now.

I'm going to close this issue here but I'm still interested why you need access to the positioning service directly?

@jingzhang
Copy link
Author

Thank you @pkozlowski-opensource for the quick response!

I'll try your suggestion.

The reason I need it is because it's used in this dropdown menu workaround #1012 (comment)

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