-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fixes primefaces/primeng#12734 - Add Document Injection #12735
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
+ Runned prettier
@@ -81,7 +81,7 @@ export class ButtonDirective implements AfterViewInit, OnDestroy { | |||
|
|||
private _internalClasses: string[] = Object.values(INTERNAL_BUTTON_CLASSES); | |||
|
|||
constructor(public el: ElementRef) {} | |||
constructor(public el: ElementRef, @Inject(DOCUMENT) private document: Document) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I don't understand how importing helps?
You must use a variable from the token, this.document
instead of document
(Inside the component and helpers instead of the global variable document
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey actually it should work because then Angular SSR knows a variable named document from the constructor if no one is present with just using document. But your absolute right that using this.document is the more correct way. Updated it :)
+ Use of this.document instead direct document
I've reviewed your pr, but can't merge due to conflicts, could you please resolve them and update the pr so we can merge safely? And don't forget to mention me afterward. Thanks for the effort and support to make PrimeNG better! |
# Conflicts: # src/app/showcase/pages/landing/landing.component.ts
+ Fixed Prettier for Landing Page
Hey @cetincakiroglu i've merged the master branch into this ticket and also fixed a prettier warning on the landing page also. But there is one error in the Headless Test that shouldn't be from this ticket ^^ |
Fixed #12734