-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
NgbRTL isn't exported from @ng-bootstrap/ng-bootstrap #4403
Comments
|
@maxokorokov Thank you for your answer. Does it mean that we shouldn't create |
I wouldn't instantiate directives like this dynamically exactly because of the issue you're facing now... constructors are not meant to be called manually... Would this solve your issues with Angular 15? → angular/angular#46868 I'll see if we can make |
@maxokorokov Thank you for your suggestion. Yes, I think angular/angular#46868 will help. With it, we would no longer need to instantiate Even though creating an instance isn't recommended, it'd be great if you can make |
We have a custom directive which extends NgbTooltip and adds additional functionality that we need to it. Now we can not compile our code due to NgbRTL not being public. Please make NgbRTL public. |
I have the same issue for NgbTooltip as well as NgbDropdown. Please make NgbRTL public. |
We got the same issue as we are extending NgbTooltip. Making NgbRTL public would resolve this. |
Hello, I have the same issue. I can't extend
|
While we still do not recommend extending our components, this would probably help → #4443. WDYT? |
@maxokorokov Oh, it looks great to me. Thank you. We're moving toward |
For people stumbling upon this problem where upgrading to version 14.0.0 isn't an immediate solution, two suggestions: a) If you're injecting properties, use Angular 14+
b) Any property initialization could be done on the Using that, you don't need to override the constructor and avoid the ngbRTL problem. |
@hudsontavares, this should have been fixed in |
Yes, @maxokorokov, thanks for pointing it out - I was shedding some alternative light for people in projects where upgrading to the fixed version isn't an immediate option and existing components are already extending some ng-bootstrap stuff. You don't need to redeclare a constructor in the subclass using the approaches above, so the original, ngbRTL-enabled constructor will continue working. |
Bug description:
After upgrading ng-bootstrap from 13.0.0 to 13.1.0, I found that
NgbTooltip
now tookNgbRTL
. So I injectedNgbRTL
and passed it to the constructor ofNgbTooltip
. When I did this, I importedNgbRTL
from@ng-bootstrap/ng-bootstrap/util/rtl
directly, because it wasn't exported from@ng-bootstrap/ng-bootstrap
.Now, while building the Angular app, I encountered this error.
I guess this can be fixed by exporting
NgbRTL
from@ng-bootstrap/ng-bootstrap
. Or, am I missing something?Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 14.2.6
ng-bootstrap: 13.1.0
Bootstrap: 5.2.2
The text was updated successfully, but these errors were encountered: