Changin input class on angular model property changes <p>I have one input of text type, and I need that this input become on span depending of the value of a property of my model. So, the jquery function that I have for become a input in span is:</p> <pre><code>$('.read').replaceWith(function(){ return '&lt;span class='+this.className+'&gt;'+this.value+'&lt;/span&gt;' }); </code></pre> <p>And the ng directive that I have used is: <strong>ng-change</strong>:</p> <pre><code>&lt;input id="1" type="text" ng-model="src.ViewModel.Model.DataA" ng-change="src.search(src.ViewModel.Model.DataA)"/&gt; </code></pre> <p>The method is:</p> <pre><code>theController.prototype.search = function(data){ if (data == 1) { theModel.DataA = data; $('.read').replaceWith(function(){ return '&lt;span class='+this.className+'&gt;'+this.value+'&lt;/span&gt;'; }); } }; </code></pre> <p>And the input that must changes is:</p> <pre><code>&lt;input type="text" ng-model="src.ViewModel.Model.DataB" ng-class="{'read': src.ViewModel.Model.DataA == 1}" /&gt; </code></pre> <p>But it does not works, so, how I can solve that ??</p> <p>Here is my Fiddle: <a href="http://jsfiddle.net/fcastelblanco/3n8o3ud7/2/" rel="nofollow">Fiddle</a></p> <p>Any help or suggestion, please ...</p>