rails api and angularJS play nice