ngValue unbind on textbox edit

http://angularjs.org/

by Luca De Nardi

HTML

<div ng-controller="MyCtrl">
    - Change A or B (notice that the concat updates)<br/>
    - Change Concat<br/>
    - Change A or B again (notice that the concat stops itself from updating)
    
    <br/><br/>
       
    Concat <input ng-value="a + b"/><br/>
    ReadOnly <input ng-value="a + b" readonly="readonly" />
    <br/><br/>
    <span>A: </span><input ng-model="a"/>
    <br/>
    <span>B: </span><input ng-model="b"/>
    <br/>
    <br/>
    Also check this <a href="http://codepen.io/ExpertSystem/pen/zGvgZP?editors=101">link</a>.
</div>

CSS

[readonly]{
    color: #666;
    background: #ddd;
}

JavaScript

var myApp = angular.module('myApp',[]);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.a = 'A';
    $scope.b = 'B';
}