I build my angularjs app with Grunt and yeoman.
My host in example.com and my api is example.com/api
Then I try to use $http like:
$http.get('/api/posts').success(function (data) {
console.log(data) //the data is my index.html code
})
Can anyone tell me why the data I get is my index.html code ? And How can I fix it ?
Thanks!