-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cfweb 121 interoperate @defer and migrate control structures #25
base: main
Are you sure you want to change the base?
Cfweb 121 interoperate @defer and migrate control structures #25
Conversation
…res to the new one
…res to the new one
…res to the new one
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.
Please check which comments are really necessary. I think some should be deleted.
If the build is green, then in my opinion it can be merged.
@@ -17,6 +24,8 @@ export class ProductComponent { | |||
@Input() product: Product; | |||
@Output() productImageClicked: EventEmitter<void> = new EventEmitter<void>(); | |||
|
|||
constructor(public elementRef: ElementRef) {} |
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.
why do we need the elementRef here?
export class ViewportService { | ||
public isInViewport(elementRef: ElementRef<any>): Observable<boolean> { | ||
return new Observable((observer) => { | ||
const element = elementRef?.nativeElement.getElementsByTagName('p')[0]; |
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.
I would suggest that this element is provided as an argument instead of doing here the query (:
return this.displayableContentSections[index / 3]; | ||
} | ||
|
||
public ngAfterViewInit(): void { |
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.
why cant we use the on-viewport here? https://angular.dev/guide/defer#on-viewport
No description provided.