The HTML specs do not require browsers to preserve the special attributes such as selected. (The presence of them means true and absence means false) This prevents the angular compiler from correctly retrieving the binding expression. To solve this problem, we introduce ng:selected.
<ANY ng:selected="template"> ... </ANY>
template – {template} –
any string which can contain '{{}}' markup.
Check me to select: <input type="checkbox" name="checked"><br/> <select> <option>Hello!</option> <option id="greet" ng:selected="{{checked}}">Greetings!</option> </select>
it('should select Greetings!', function() { expect(element('.doc-example-live #greet').attr('selected')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live #greet').attr('selected')).toBeTruthy(); });