Skip to content

richard-clark/angular-zxcvbn-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular ZXCVBN Module

Provides an Angular module Dropbox's zxcvbn password strength indicator without requiring that zxcvbn be defined globally.

Installation

Using npm:

npm install --save angular-zxcvbn-module

Using bower:

bower install --save angular-zxcvbn-module

Building

This releases uses version 3.2.2 of zxcvbn.

To use a different release, update package.json with the appropriate version, and run:

npm install
npm run build

Usage

Watch a $scope variable named password and sets the passwordStrength $scope property whenever the password changes:

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);
    });
  });

License

Code released under the MIT license.

About

Provides an Angular wrapper around Dropbox's zxcvbn

Resources

License

Stars

Watchers

Forks

Packages

No packages published