Skip to content

Mask your Social Security Number Input Box without changing your model value in AngularJS

Notifications You must be signed in to change notification settings

deepakkoirala/SSN-Mask-AngularJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

$ npm install ssn-mask
Create app.js
var app = angular.module('ssnApp', ['ssnMaskMod']);

app.controller('MainCtrl', function($scope) {
  $scope.ssnval = '';
});
Create index.html
<!DOCTYPE html>
<html ng-app="ssnApp">
  <head>
    <script src="https://code.jquery.com/jquery.js"></script>
    <script data-require="[email protected]" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.11/angular.min.js" data-semver="1.5.11"></script>
    <script src="node_modules/jquery.maskedinput/src/jquery.maskedinput.js"></script>
    <script src="node_modules/ssn-mask/ssn-mask.js"></script>
    <script src="app.js"></script>
  </head>
  <body ng-controller="MainCtrl">
    <input type="text" ng-model='ssnval' ssn-input >
    <p>SSN {{ssnval}} !</p>
  </body>
</html>
Dependencies

Demo:

About

Mask your Social Security Number Input Box without changing your model value in AngularJS

Resources

Stars

Watchers

Forks

Packages

No packages published