Added support for ngModel attributes

Based on http://jsfiddle.net/8bENp/66/