Home > Cannot Read > Cannot Read Subscription Data

Cannot Read Subscription Data

Contents

This is a very simple component, just trying to get a bare minimum to work here. We'll modify the .subscribe method: .subscribe(data => { this.data = data.results; resolve(this.data); }); Now, our method, when called, will return a promise, which will resolve with an array of users when Enable the following property on Loading, and it will throw the 'native element' exception. InfoWorld also celebrates people, companies, and projects. this contact form

Ionic member jgw96 commented Apr 20, 2016 Thanks for the info everyone! Using Promises Promises are the de-facto standard for asynchronous processing in JavaScript. Search on GeoNet Submit to ArcGIS Ideas Error: Cannot read data in a file geodatabase after compression Error Message Compressing a file geodatabase while data, such as a table, feature class, This should fix this issue. http://stackoverflow.com/questions/34734671/observable-type-error-cannot-read-property-of-undefined

Angular2 Cannot Read Property Of Undefined

edit flag offensive delete link more add a comment Login/Signup to Answer Question Tools Follow 1 follower subscribe to rss feed Stats Asked: 2016-01-20 15:49:38 +0100 Seen: 51 times Last updated: Go to Solution. My console.log outputs the object I would expect. http://plnkr.co/edit/3TfK76XpqsnUvW3dQuG3?p=preview I had to do some trickier things in my implementation because I am using EventEmitters to indicate when an http request is started and when it has completed.

First element in about.html:

Also added to about.component.ts: import {CORE_DIRECTIVES} from 'angular2/common'; directives: [CORE_DIRECTIVES], –Ryan Langton Jan 12 at 3:31 I needed to add the following line I can confirm that adding in an artificial delay using setTimeout() when trying to clear the Loading makes it function correctly. $ ionic info Cordova CLI: Not installed Ionic Framework Version: Because helpers are reactive, developers are often tempted to use them as a shortcut to link changes together. Uncaught Typeerror: Cannot Read Property 'observable' Of Undefined Creating a New Provider Let's look at adding a new provider (also known as a service), which will be used to make an HTTP request to an API.

If i set dismissOnPageChange: true or do a page-push before dismissing all loading-overlays, I get the same error as @tonyawad88 in his original post. Steps to reproduce: Create a new ionic project ionic start MyIonic2Project tutorial --v2 --ts On the root page, add in its constructor the following: import {Page,Loading,NavController} from 'ionic-angular'; @Page({ templateUrl: 'build/pages/hello-ionic/hello-ionic.html' As @pixelbits mentioned in a comment, you can subscribe() to the observable in the controller and store the contained object into a component property. https://community.microstrategy.com/t5/Object-Development/Exception-occured-while-reading-data-from-the-stream-Cannot-read/td-p/11960 It is possible that you are suffering from the OpenGL bug.

i'm not really used to this. Angular2 "cannot Read Property 'parameters' Of Undefined" Tweet Subscribe! There are two options to address this issue: Standardize on a Promise-based API: In the REST service implementation, convert the Observables returned by the http methods to Promises. Check this plunker out, if you display / hide the loading using the buttons, no exceptions occurs.

Cannot Read Property 'subscribe' Of Undefined Angular 2

You may, however, want to retain the server-side sort in cases where the data transmission time is significant. view publisher site You need to check if the variable is defined before use it in your template. Angular2 Cannot Read Property Of Undefined Let's put this in our PeopleService. Angular 2 Cannot Read Property Of Undefined keep sharing.

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed weblink Browse other questions tagged angular2 observable rxjs or ask your own question. Observable subscribe0Angular2 Cannot read property 'Symbol(Symbol.iterator)' of undefined Hot Network Questions How to decide between PCA and logistic regression? Mongo is a schemaless database." developer: "Okay, but it's so easy just to declare a new collection on the client." me: "Sure, but that doesn't do you any good unless the Angular2 Cannot Read Property 'subscribe' Of Undefined

I will look into this more. 😄 1 keithdmoore commented May 20, 2016 • edited @tonyawad88 to be more specific here is what I am doing. (currently on beta6) In I am able to reproduce this and we are now looking further into this. Already have an account? navigate here this is my folder structure rapropos 2016-06-28 03:38:55 UTC #8 Sorry, I can't help any further because I hate JavaScript.

it's a bit new for me. Cannot Read Property '$routeronactivate' Of Undefined I'm only getting a blank page. This is because helpers are intended to be synchronous translators which are free of side effects.

Content is segmented into Channels and Topic Centers.

After changing into the project directory (cd apiApp), let's create a new provider called PeopleService, using the CLI. I want to display a loading spinner while querying a http client… Thanks in advance Michael Bishop I am getting an error: Error TS2304: Cannot find name ‘resolve'. .subscribe(data => { MOSTSELFISHMAN Is it possible to see an authentication tutorial? Angular2 Typeerror Cannot Read Property Of Undefined planned https://github.com/driftyco/ionic/issues/5532/ 3: Quite a bit to do.

How difficult is it to practically detect a forgery in a cryptosystem? Anyway, you can try OnActivate angular.io/docs/js/latest/api/router/OnActivate-interface.ht‌ml . Please help. http://sauvblog.com/cannot-read/cannot-read-data-from-serial-port.html Check out the FAQ!

I have a little more complex system. To avoid this error you can wrap about.html with

...
share|improve this answer answered Jan 12 at 2:39 TheKojuEffect 5,64583667 I've done this and still get Updates pages to show loading mask when waiting on backend. export class HomePage { public people: any; constructor(public peopleService: PeopleService){ this.loadPeople(); } loadPeople(){ this.peopleService.load() .then(data => { this.people = data; }); } } Now that our class is getting the data,

Content is segmented into Channels and Topic Centers. StatusBar.styleDefault(); }); } openPage(page) { // close the menu when clicking a link from the menu this.menu.close(); // navigate to the new page if it is not the current page this.nav.setRoot(page.component); We may do a nightly that includes these changes soon and i will update this issue when that happens. Hope this helps.

I'd recommend using a combination of both approaches in your applications depending on your UI requirements. It is not an array of documents. Check the console for the exception Other information: (e.g.