Paldom / angular2-rest

Angular2 HTTP client to consume RESTful services. Built with TypeScript.
MIT License
248 stars 72 forks source link

can you write a demo ? thank you #5

Closed ghost closed 6 years ago

ghost commented 8 years ago

i used it it can not work can you write a demo ? thank you

ghost commented 8 years ago

var a=new TodoRESTClient() alert(a.getTodos())

Paldom commented 8 years ago

I'm wokring on a demo, but it needs more time than I thought. Hope to finish it shortly.

ghost commented 8 years ago

thank you very much,i used http://jsonplaceholder.typicode.com/ testting my project :)

mmrath commented 8 years ago

I have created a plunker. See if it helps

ghost commented 8 years ago

@mmrath thank you very much :)

NicolasCayet commented 8 years ago

Hi, First of all, thanks for your module. That's the only REST module i've found for Angular2.

But I'm a bit confused. Your joined plunker is not relevant, because it does not show a proper usage as a node module.

I've included the angular2-rest/angular2-rest.js file in my index.html and I'm stuck on an "Uncaught ReferenceError: require is not defined" (angular2-rest.js:46)

Can you provide more example please ? At least, a simple usage considering angular2-rest has been installed with npm install ?

NicolasCayet commented 8 years ago

After some time of workaround, I finally decided to use the code present in angular2-rest.ts you shared on Plunker, including it as a .ts file in my project (building it with the rest of my application), and it works !

It seems the version available among NPM is not up-to-date.

I'm still interested to deploy your solution as a node module (through NPM), and hope you'll can provide more information about how to use it.