I have used ng-disabled=“true” inside <ion-md-input>
tag.But it didn’t work.
<ion-md-input placeholder="My Placeholder" highlight-color="assertive" type="text" ng-disabled="true"></ion-md-input>
I have used ng-disabled=“true” inside <ion-md-input>
tag.But it didn’t work.
<ion-md-input placeholder="My Placeholder" highlight-color="assertive" type="text" ng-disabled="true"></ion-md-input>
Ok I Just solved it…I have added attributes for ‘ng-disabled’ property in ionic-md-input.js
var input = element.find(‘input’);
angular.forEach({
‘name’: attr.name,
‘type’: attr.type,
‘ng-value’: attr.ngValue,
‘ng-model’: attr.ngModel,
‘required’: attr.required,
‘ng-required’: attr.ngRequired,
‘ng-minlength’: attr.ngMinlength,
‘ng-maxlength’: attr.ngMaxlength,
‘ng-pattern’: attr.ngPattern,
‘ng-change’: attr.ngChange,
‘ng-trim’: attr.trim,
‘ng-blur’: attr.ngBlur,
‘ng-focus’: attr.ngFocus,
‘readonly’:attr.readOnly,
‘ng-disabled’:attr.disable
}, function(value, name) {
if (angular.isDefined(value)) {
input.attr(name, value);
}
});
Thank U…
Hi! Update! It is not ng-disabled: attr.disable but ng-disabled: attr.ngDisabled
So mine will be /*Start From here*/ var input = element[0].querySelector('.md-input'); angular.forEach({ 'name': attr.name, 'type': attr.type, 'ng-value': attr.ngValue, 'ng-model': attr.ngModel, 'required': attr.required, 'ng-required': attr.ngRequired, 'ng-minlength': attr.ngMinlength, 'ng-maxlength': attr.ngMaxlength, 'ng-pattern': attr.ngPattern, 'ng-change': attr.ngChange, 'ng-trim': attr.trim, 'ng-blur': attr.ngBlur, 'ng-focus': attr.ngFocus, 'readonly':attr.readOnly, 'ng-disabled':attr.ngDisabled, }, function(value, name) { if (angular.isDefined(value)) { input.setAttribute(name, value); } });