Hi everyone, i'm new with angular and starting with this seed just now.
https://github.com/angular/angular-seed
Before questions, i already tried the angular-tutorial step5 (http://docs.angularjs.org/tutorial/step_05) and it worked when i wasn't using angular-seed
For a test, the attempt was getting locally saved json (at the root folder /phones.json)
It always returns my whole DOM as response.
I'm assuming it's because my $http.get url is not correct.
In my controller:
$http.get('http://localhost:3000/phones.json')
.then(function(data) {
console.log(data);
$scope.phones = data;
});
The url param is trying to get some page, right ? But i need to get my json file.
I would like to know where should i put my local json and how should i mention it on url param for $http.get.
Thanks, if u could help me, i appreciate!
$http.get('/content/your-data.json' ).
success(function(data) {
$scope.text = data
});