Password component throws an error when handling keyup events and feedback is false #6334
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/angular-datnyq?embed=1&file=src/app/app.component.html
Current behavior
When you set
feedback
tofalse
on apPassword
component and try to handlekeyup
events, the application throws the following error:It seems that the component tries to access to some properties of the password strength helper, but it can't because it doesn't exist.
Expected behavior
It should manage internally whether the feedback component exists or not, to avoid accessing it in case that
feedback
isfalse
.Minimal reproduction of the problem with instructions
To reproduce the problem, just drop a
pPassword
component with[feedback] = false
and bind akeyup
event handler. For example:<input name="password" type="password" pPassword [feedback]="false" (keyup)="checkForm($event)" [(ngModel)]="pass"/>
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Kubuntu 18.04 64 bits, NPM 6.4.0
Angular: 6.1.3
PrimeNG 6.1.2
I tested it on Chrome and Firefox and it's the same on both.
Language: [all | TypeScript X.X | ES6/7 | ES5]
TypeScript
Node (for AoT issues):
node --version
=Node v10.6.0
The text was updated successfully, but these errors were encountered: