I have a custom directive:
myApp.directive('input', function () { return { restrict: 'E', scope: true, link: function (scope, elem) { if (scope.lang && elem.attr('type') === 'text') { elem.attr('lang', 'fa'); console.log(scope.lang); } } }; });
which add the lang='fa' attribute to all inputs: text, and I also use DatePicker angular Ui , but I get an error:
Error: [$compile:multidir] Multiple directives [datepickerPopupPersian, input] asking for new/isolated scope on: <input type="date" name="birth" class="form-control ng-pristine ng-untouched ng-valid" datepicker-popup-persian="{{formats.ShowDate}}" tabindex="7" ng-model="requesterViewModel.BirthDate" is-open="datePicker.opened" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" close-text="بسته" max-date="dt">
when I comment on datePicker in my form, everything works fine.
Any ideas? Thanks
source share