خرید بک لینک

Vote count: 0

Issue is that only the first directive is working and other one is not. Provided below are the two directives. Both works fine when working alone.

  .directive("restrictInvalidInput", function($rootScope, utils) {
      retu {
          restrict: "A",
          require: "ngModel",
          priority: 1,
          link: function(scope, elem, attr, ctrl) {
              var remove_invalid_chars = function() {
                  //blah blah
              };

              ctrl.$parsers.push(remove_invalid_chars);
          }
      }
  })

  .directive("validateUseame", function($rootScope, utils) {
      retu {
          restrict: "A",
          require: "ngModel",
          priority: 2,
          link: function(scope, elem, attr, ctrl) {

              var validate_useame = function(modelValue, viewValue) {
                  //blah blah
              };

              ctrl.$validators.valid_useame = validate_useame;
          }
      }
  });

asked 39 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 4 تير 1395 ساعت: 0:46

صفحه بندی