Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Subscribe function never gets invoked #1

Closed
AngularTx opened this issue Nov 9, 2016 · 11 comments
Closed

.Subscribe function never gets invoked #1

AngularTx opened this issue Nov 9, 2016 · 11 comments

Comments

@AngularTx
Copy link

Hi,
When using version 0.0.35 , the Url hits the server and the details can be seen in the network tab. But the .subscribe function doesnot get invoked later ?

ngOnInit()
{
console.log('trying to fetch data....');
this.restangular.all('users').getList()
.subscribe((data: any) => {
console.log('data is fetched....');
console.log(data[0].id);
})

}

@2muchcoffeecom
Copy link
Owner

Hi, Jaahmed!

You should update to 0.1.7 first. I think thats because you are using version without Observables. Please ping me if you still has this issue after update.

@2muchcoffeecom
Copy link
Owner

Don't forget to star the repo if you like it 😉

@AngularTx
Copy link
Author

Hi
Don't we have the concept of map in rest? In the examples shown we don't
see any such examples.?

Map and subscribe? Any examples?

Thanks in advance..
On Nov 10, 2016 3:31 AM, "2muchcoffee" notifications@github.com wrote:

Hi, Jaahmed!

You should update to 0.1.7 first. I think thats because you are using
version without Observables. Please ping me if you still has this issue
after update.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
2muchcoffeecom/ng2-restangular#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AStMS3f3Ng--ShXGV3dTdsHHCdxEZi01ks5q8kKagaJpZM4KuBim
.

@logvinoleg89
Copy link
Collaborator

logvinoleg89 commented Nov 10, 2016

Hi, Jaahmed!

Now we work on examples, soon you can see them in Plunker.
Here some basic example for you:

Restangular.one('accounts', 1234).get()
.map(response =>{
  response.newVariable = 'test';
  return response;
})
.subscribe(response =>{
  console.log(response);
})

@AngularTx
Copy link
Author

Hi ,

Thanks for the reply.

Is version 0.1.4 stable ? Will observables be present in it?

I am working for a bank ,I need to see if they have version 0.1.7. But they
have version 0.1.4 for now.
On Nov 10, 2016 1:41 PM, "logvinoleg89" notifications@github.com wrote:

Hi, Jaahmed!

Now we work on examples, soon you can see them in Plunker.
Here some basic example for you:

Restangular.one('accounts', 1234).get()
.map(response =>{
response.newVariable = 'test';
return response;
})
.subscribe(response =>{
console.log(response);
})


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
2muchcoffeecom/ng2-restangular#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AStMS4fvIYJCqMCmYKxC8rgh-HGI6i2Bks5q8tGogaJpZM4KuBim
.

@logvinoleg89
Copy link
Collaborator

Yes observables are present in v0.1.4

@AngularTx
Copy link
Author

Hi, just installed version 0.1.7. It's kind of bit shocking..when I type in
restangular.setBaseUrl... The function is not found. But in the
rectangular.js file I can see the definitions method. Is there an issue or
I need to make changes?

Definition not found in d.ts file. But when I use your git hub repo I see
no issues with it.

Please let me know what could the issue be.

I need to complete a task on this. Would be great if you could reply ASAP.
On Nov 10, 2016 3:21 PM, "logvinoleg89" notifications@github.com wrote:

Yes observables are present in v0.1.4


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
2muchcoffeecom/ng2-restangular#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AStMS1LOu12omvfmaJTkt7KNQYfRRGT7ks5q8ukMgaJpZM4KuBim
.

@logvinoleg89
Copy link
Collaborator

Please check this link

@AngularTx
Copy link
Author

Is it possible if some one can talk via WhatsApp. I can explain the issue.
I don't find many resource around who are working in this...
On Nov 10, 2016 8:41 PM, "Javeed Ahmed" javeedahmed111@gmail.com wrote:

Hi, just installed version 0.1.7. It's kind of bit shocking..when I type
in restangular.setBaseUrl... The function is not found. But in the
rectangular.js file I can see the definitions method. Is there an issue or
I need to make changes?

Definition not found in d.ts file. But when I use your git hub repo I see
no issues with it.

Please let me know what could the issue be.

I need to complete a task on this. Would be great if you could reply ASAP.
On Nov 10, 2016 3:21 PM, "logvinoleg89" notifications@github.com wrote:

Yes observables are present in v0.1.4


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
2muchcoffeecom/ng2-restangular#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AStMS1LOu12omvfmaJTkt7KNQYfRRGT7ks5q8ukMgaJpZM4KuBim
.

@AngularTx
Copy link
Author

Hi, I have checked your link,also was able to make changes in the git repo
which you have. But if you just download your package and then with some
sample application, we can see that some basic function like setBaseUrl
will not be found.

Is there a specific version of node and npm to be used?
On Nov 10, 2016 8:53 PM, "logvinoleg89" notifications@github.com wrote:

Please check this link
https://github.com/2muchcoffeecom/ng2-restangular#how-to-configure-them-globally


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
2muchcoffeecom/ng2-restangular#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AStMS_aWwS63osMuiMc_-IQzm_FRhtmUks5q8zVFgaJpZM4KuBim
.

@rshchpkn
Copy link
Collaborator

rshchpkn commented Nov 11, 2016

Hi, please check this withConfig link, I think it will help you. Configurating Restangular possible in three ways globaly in module, in service, or in component

Repository owner locked and limited conversation to collaborators Nov 11, 2016
Repository owner unlocked this conversation Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants