the HTML specs do not require browsers preserve the special attributes such as readonly.(The presense of them means true and absense means false) This prevents the angular compiler from correctly retrieving the binding expression. To solve this problem, we introduce ng:readonly.
<ANY ng:readonly="template"> ... </ANY>
template – {template} –
any string which can contain '{{}}' markup.
Check me to make text readonly: <input type="checkbox" name="checked"><br/> <input type="text" ng:readonly="{{checked}}" value="I'm Angular"/>
it('should toggle readonly attr', function() { expect(element('.doc-example-live :text').attr('readonly')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live :text').attr('readonly')).toBeTruthy(); });