Wijmo 5 - InputMask
Added isReadOnly property
by Joel Parks
HTML
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://cdn.wijmo.com/5.latest/styles/wijmo.min.css">
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.input.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/interop/angular/wijmo.angular.min.js"></script>
<!-- mark this as an Angular application and give it a controller -->
<div ng-app="app" ng-controller="appCtrl">
<wj-input-mask mask="" title="Mask: Name"></wj-input-mask>
</div>
JavaScript
// define app, include Wijmo 5 directives
var app = angular.module('app', ['wj']);
// controller
app.controller('appCtrl', function ($scope) {
/*$scope.text="Joel";
$scope.val="";
Object.defineProperty(wijmo.input.InputMask.prototype, "isReadOnly", {
get: function () {
return this._isReadOnly;
},
set: function (val) {
this._isReadOnly = val;
this.inputElement.readOnly = this._isReadOnly;
},
enumerable: true,
configurable: true
});
$scope.$watch("mask",function(){
var mask= $scope.mask;
if(mask){
mask.isReadOnly=true;
}
})*/
});