I work on my angularjs project.
I created HTML view that changes modes from display view to edit view by click on the button.
I created css class named edit-mode
.
Here is plunker.
Here is my view:
<form class="form-horizontal form-sm">
<div ng-class="{'edit-mode':editor.edit}">
<div class="form-group">
<div class="col-xs-8">
<span class="view">{{ma.inspection}}</span>
<textarea cols="20" rows="2" my-maxlength="5" ng-model="ma.inspection" class="form-control edit"></textarea>
</div>
</div>
<br/>
<input type="button" ng-click="editor.edit = false" value="Display mode">
<input type="button" ng-click="editor.edit = true" value="Edit mode">
</div>
</form>
Here is controller:
var app = angular.module('myApp', ['ngAnimate']);
app.controller('MyApp', [function() {
var self = this;
this.inspection = "Click on button to change mode!";
}]);
Here is my css code:
.edit, input[type=file].edit {
display: none;
}
.edit-mode {
.view {
display: none;
background-color:red;
}
.edit, input[type=file].edit {
display: initial;
}
}
The code above works perfect in chrome browser. But it not works on IE browser(I use IE 11) the textarea element and select element not displayed .
Any Idea how can I fix this problem,to make this work also on IE browser?