angular directive ignore non-numeric input

前端 未结 4 764
北荒
北荒 2020-11-30 06:37

I have to write some code for IE8. I have an ng-repeat creating a table filled with:



        
4条回答
  •  心在旅途
    2020-11-30 07:07

    First include this code in js file numericInput.js

    Directive : -

    .directive('numeric', function() {
        return function(scope, element, attrs) {
    
            $(element[0]).numericInput({ allowFloat: true });
    
        };
    })
    

    HTML : -

     
    

    DEMO Numeric Demo

提交回复
热议问题