Skip to content

An angular plugin to generate the verification code on the webpage.

License

Notifications You must be signed in to change notification settings

qswy929/angular-verification-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

angular-verification-code

Usage

It should be used as follows.

<div class="form-group">
  <label class="btn-block" for="form-valicode">验证码</label>
	<input type="password" name="form-valicode" placeholder="" class="form-password form-control width-short" id="form-valicode" />
	<canvas class="vali-canvas" id="myCanvas" data-ng-init="createCode()" ng-click="createCode()" data-toggle="tooltip" data-placement="top" title="点击更换验证码">
		当前浏览器不支持canvas标签!
	</canvas>
</div>
<script src="scripts/valicode.js"></script>

Note that the id of the tag must be "form-valicode".

To make it work, please add such angular codes on the webpage as:

  angular.module("loginApp",[])
    .controller("loginController",function($scope){
      $scope.createCode = createCode;
      $scope.validate = validate;
    });

About

An angular plugin to generate the verification code on the webpage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published