Provides an Angular wrapper around zxcvbn without dumping zxcvbn into the global scope.
npm install angular-zxcvbn-moduleProvides an Angular module Dropbox's zxcvbn password strength indicator without requiring that `zxcvbn be defined globally.
Using npm:
`bash`
npm install --save angular-zxcvbn-module
Using bower:
`bash`
bower install --save angular-zxcvbn-module
This releases uses version 3.2.2 of zxcvbn.
To use a different release, update package.json with the appropriate version, and run:
`bash`
npm install
npm run build
Watch a $scope variable named password and sets the passwordStrength $scope property whenever the password changes:
`javascript
angular.module('app', [
'angular-zxcvbn-module'
]);
angular.module('controllers', [])
.controller('SomeController', ["$scope", "zxcvbn"], function($scope, zxcvbn){
$scope.$watch("password", function() {
$scope.passwordStrength = zxcvbn($scope.password);
});
});
``