Closed bogdanbaghiu closed 3 years ago
If possible, can you please post the code that is setting the barLabel
value? Thanks.
I have created a repository where I leave all the code necessary to reproduce the error: https://github.com/bogdanbaghiu/test-ng2-password-checker
@bogdanbaghiu Thanks for the usage example. Parameter changes also trigger the ngOnChange
event and your PR resolves this bug. Please see bogdanbaghiu-master changes where I've simplified the logic change and added a test that reproduces the issue.
I will merge these changes and push a new NPM version (v1.2.5).
@rnadler Thanks for fixing it :) regards
Just published v1.2.5 to NPM. Give it a try and let me know if you have any issues. Thanks!
Hello.
I am trying to change the barLabel tag based on the language. When I change from English to Spanish I should change "Password consistent" to "Password consistency" but it gives me the following error. I have observed that it looks if the currentValue of the password is
var password = changes['passwordToCheck'].currentValue;
It is seen that the passwordToCheck is undefined and cannot read currentValue.EditUserPage.html:22 ERROR TypeError: Cannot read property 'currentValue' of undefined at PasswordStrengthBarComponent.push../node_modules/ng2-password-strength-bar/lib/passwordStrengthBar.component.js.PasswordStrengthBarComponent.ngOnChanges (passwordStrengthBar.component.js:77) at checkAndUpdateDirectiveInline (core.js:27784) at checkAndUpdateNodeInline (core.js:38472) at checkAndUpdateNode (core.js:38411) at debugCheckAndUpdateNode (core.js:39433) at debugCheckDirectivesFn (core.js:39376) at Object.eval [as updateDirectives] (EditUserPage.html:23) at Object.debugUpdateDirectives [as updateDirectives] (core.js:39364) at checkAndUpdateView (core.js:38376) at callViewAction (core.js:38742)