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

Lazy loading modules that use pTemplate do not work without importing SharedModule #9782

Closed
pete-mcwilliams opened this issue Jan 18, 2021 · 5 comments

Comments

@pete-mcwilliams
Copy link
Contributor

I'm submitting a ... (check one with "x")

[ * ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-fux54h?file=src/app/app.component.html

Current behavior
When lazy loading modules that use PrimeTemplate then they do not work unless they are importing SharedModule, or another module that exported SharedModule.

I've noticed this behaviour in MessageModule and OverlayPanel, but suspect any module that is using pTemplate will need to export ShareModule to work independently when lazy loading.

#9033
#9023

It was fixed for one module here:
#8031

Expected behavior
Modules should be self contained.

Minimal reproduction of the problem with instructions
see plunker

Please tell us about your environment:
As it's reproducible in the plunker skipping the environment settings descriptions, but we are on latest prime, angular 11 etc.

@pete-mcwilliams pete-mcwilliams changed the title Some lazy loaded Lazy loading modules that use pTemplate do not work without importing SharedModule Jan 18, 2021
@yigitfindikli yigitfindikli added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Feb 12, 2021
@yigitfindikli
Copy link
Contributor

Seems to be solved in v11.3.0.
Check example: https://stackblitz.com/edit/github-fux54h-n9es2j

@yigitfindikli yigitfindikli removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Mar 11, 2021
@pete-mcwilliams
Copy link
Contributor Author

Changed my blitz to use version 11.3.0 and the issue is resolved. Thanks.

@rdhanasekar
Copy link

The same issue still exists in p-menubar. If I just use the p-menubar component with start and end templates, the templates are not rendered, only the menu is rendered. I guess the menubar module needs the same fix.

@zxxz
Copy link

zxxz commented Oct 18, 2021

The same issue still exists in p-menubar. If I just use the p-menubar component with start and end templates, the templates are not rendered, only the menu is rendered. I guess the menubar module needs the same fix.

I confirm the issue still exists in p-menubar in version 12.2.1

@PaxPax
Copy link

PaxPax commented Oct 21, 2021

The same issue still exists in p-menubar. If I just use the p-menubar component with start and end templates, the templates are not rendered, only the menu is rendered. I guess the menubar module needs the same fix.

I confirm the issue still exists in p-menubar in version 12.2.1

I did some searching and it looks like be71665 though was for a different issue, maybe it will work as a solution for this one as well?

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

No branches or pull requests

5 participants