use angular=route. Also use rabl and oj gem to manage json api templates