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

[Angular] amplify-authenticator does not appear in components using OnPush change detection strategy #5899

Closed
4 tasks done
WojciechKasprzyk opened this issue Oct 13, 2024 · 1 comment
Labels
duplicate An issue or a feature-request that is a duplicate of an existing one

Comments

@WojciechKasprzyk
Copy link

WojciechKasprzyk commented Oct 13, 2024

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

Angular

Which UI component?

Authenticator

How is your app built?

Vite

What browsers are you seeing the problem on?

Chrome, Firefox, Microsoft Edge, Safari, iOS (React Native), Android (React Native)

Which region are you seeing the problem in?

No response

Please describe your bug.

amplify-authenticator tag remains empty in OnPush components (even triggering change detection manually does not help).

import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { TodosComponent } from './todos/todos.component';
import { AmplifyAuthenticatorModule } from "@aws-amplify/ui-angular";


@Component({
  selector: 'app-root',
  standalone: true,
  templateUrl: './app.component.html',
  styleUrl: './app.component.css',
  imports: [RouterOutlet, TodosComponent, AmplifyAuthenticatorModule],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements AfterViewInit {
  title = 'amplify-angular-template';
  private cdr = inject(ChangeDetectorRef)
  ngAfterViewInit() {
    this.cdr.detectChanges();
  }
}
image

What's the expected behaviour?

I expect to see the authenticator element

image

Help us reproduce the bug!

Use the official demo app ( https://github.com/aws-samples/amplify-angular-template ) with authenticator, and change changeDetection to OnPush

Console log output

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify UI maintainer labels Oct 13, 2024
@esauerbo esauerbo added duplicate An issue or a feature-request that is a duplicate of an existing one and removed pending-triage Issue is pending triage labels Oct 14, 2024
@esauerbo
Copy link
Contributor

Hi @WojciechKasprzyk thanks for reporting this. Please track this feature request in #4899.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify UI maintainer label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate An issue or a feature-request that is a duplicate of an existing one
Projects
None yet
Development

No branches or pull requests

2 participants