How to work with Angularjs without the API being ready?

Asked

Viewed 84 times

0

I want to do the front-end of my application with Angularjs only that my Restful API is not yet ready to be consumed, it has some tool that helps me to work the returns in JSON?

  • You can install an extension for Chrome: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

2 answers

2


1

I don’t know any API, but you can do it this way.

$scope.jsonTeste = { "prop": true, "prop2": false } // Add your json here.

then you change to your request.

$http(url).then(function(retorno) { $scope.jsonTeste = retorno.data  } );

so that one thing does not depend on the other, and can be fully developed the part.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.