Extended Angular.js API. Relates to #4