Retrieving Data with HTTP - Ionic 3, Angular 4 and RxJS

  Рет қаралды 78,844

Paul Halliday

Paul Halliday

Күн бұрын

Пікірлер: 106
@fyvewytches
@fyvewytches 7 жыл бұрын
This is one of the best tutorials I've seen on YT. Clear, precise and to the point. Thank you !!
@christinaphillips6190
@christinaphillips6190 7 жыл бұрын
So far the best resource for learning the Ionic 3 framework besides the docs themselves. Thanks so much for all this Paul.
@paulhalliday
@paulhalliday 7 жыл бұрын
Thank you for such positive feedback Christina!
@loukas371
@loukas371 6 жыл бұрын
God bless your soul, this is the best tutorial of this that I have seen around. You explained everything instead of just typing code. Now I am finally not just blindly copying commands...
@thembeladaphula4835
@thembeladaphula4835 5 жыл бұрын
Great tutorial. I'd like to do CRUD functionality using Firestore. I'd like to do all of this inside the server
@TheBenFlock
@TheBenFlock 7 жыл бұрын
Yet another wildly useful tutorial! The way you make these things flow is seriously unparalleled. They shouldn't be free! Quick question: I noticed at 9:20 you used ngFor on your ion-list element instead of your ion-item element. Is iterating over lists to create several lists preferable to iterating over the item creating one list of several items?
@paulhalliday
@paulhalliday 7 жыл бұрын
Hi Patrick, Thanks once again, you're too kind. With regards to the *ngFor, you're right! I can't believe I missed that, haha. I'm glad you pointed that out because yes, it is currently really bad for performance if we had a large list. I've added an annotation regarding this. Paul
@TheBenFlock
@TheBenFlock 7 жыл бұрын
Well glad I could help! Feel like I owe you. Honestly I'm very new to all this so I hadn't ruled out that using ngFor on the list might have been better. Thanks for clearing it up.
@paulhalliday
@paulhalliday 7 жыл бұрын
That's the glory of it all! You never stop learning. :)
@shahariarkabirbhuiyan3108
@shahariarkabirbhuiyan3108 7 жыл бұрын
Great video! Should we use providers when using cordova plugins? Most of your previous videoes use plugins directly in the page/controller component. I was just wondering if it's a good idea to use plugins in providers
@paulhalliday
@paulhalliday 7 жыл бұрын
Hi Shahariar, Yup. You should abstract the functionality of the Cordova plugins to a provider in 99% of cases. I just put them in the component as they're intended to be viewed as an introduction to the plugin, and leave the integration down to the viewer and their app. :)
@CharlesSkariah
@CharlesSkariah 7 жыл бұрын
Awesome tutorial. In between which IDE are you using?
@paulhalliday
@paulhalliday 7 жыл бұрын
Charles Skariah VS Code. :)
@ahmedakermi
@ahmedakermi 7 жыл бұрын
Please Firebase with ionic 3 {{save data retrive data add image}}
@stefanzivic1636
@stefanzivic1636 7 жыл бұрын
Great explanation ! Just keep going this way.
@abdelilahamanzou4698
@abdelilahamanzou4698 6 жыл бұрын
hi thanks for doing this . please do you have a video about realtime applications with angular and Rxjs. somthing like a home page that refresh automatically
@watsoncyrusanikwai3888
@watsoncyrusanikwai3888 7 жыл бұрын
Nice Vid mahn. Can you do a tutorial on fetching data from the WordPress API?
@ideasolutionbz
@ideasolutionbz 5 жыл бұрын
thanks for sharing Paul. any way how to keep checking for changes in the api? like example every 10 seconds.
@paulhalliday
@paulhalliday 5 жыл бұрын
I'd look at creating a Websocket for this. Pairs well with Observables and RxJS
@paulhalliday
@paulhalliday 5 жыл бұрын
I have a video on this actually: kzbin.info/www/bejne/pJW1foeaj7d0aqs
@ideasolutionbz
@ideasolutionbz 5 жыл бұрын
@@paulhalliday wow great. thank you. as always your your videos are very good and help many people. this is a bit off topic but i know you can help me. i am trying to hide notification icon based on an if else condition. not sure how to write the function if notifications.length = 1 or more than 1 notificationReceived: boolean = false; notifications: any[]; totalNotifications: number; if (notifications.length === 0) { this.notificationReceived = false; } else { this.notificationReceived = true; }
@taowang2823
@taowang2823 7 жыл бұрын
hi Paul,would u give some example about post
@aditiarahman435
@aditiarahman435 6 жыл бұрын
hello can you add sample adding custom http header on request call, thanks
@paulhalliday
@paulhalliday 6 жыл бұрын
Good point. I'll add that to my list! :)
@clenton8454
@clenton8454 6 жыл бұрын
Hi Mr.Paul, Your videos are very helpful to learn Ionic. Am working on an application which will retrieve data from remote Oracle server through API on a button click and insert it to SQLITE DB. It takes 8 Minutes to retrieve 3000 records. Is there anything available to solve this issue.
@mahmoudnabeel9625
@mahmoudnabeel9625 7 жыл бұрын
Is there any way to add a search button that retrieves results from JSON or API link. For instance, is it possible to create an app that search and retrieve google images for the string written in the search bar?
@TheMarionatera
@TheMarionatera 7 жыл бұрын
Hi guys, i have a question, the data can not update in real time every time i'd to close the app and open again. should i use an interval like subscribe().interval() ? regards..
@jorgeutrilla9892
@jorgeutrilla9892 7 жыл бұрын
Hello Paul, congrats on the video it really helps, rxjs is kind of confusing for me. I have a little question... shouldn´t 'throw' be imported? I did not see that on the video (import 'rxjs/add/observable/throw';)
@paulhalliday
@paulhalliday 7 жыл бұрын
Hi Jorge, This is true! I think I must have accidentally cut it off the video! :< Paul
@hasansyed8728
@hasansyed8728 6 жыл бұрын
Paul, i want to reterive JSON data from server and display as marquee in screen. as suggestions how to do that?
@faifar
@faifar 7 жыл бұрын
what theme/text-font are you using for code editor?
@RaviSojitraJarvis
@RaviSojitraJarvis 7 жыл бұрын
Awesome explanation.. :) :D Thanks for sharing.
@paulhalliday
@paulhalliday 7 жыл бұрын
Thanks Ravi! I'm glad you liked it. :)
@thelastcodebender3661
@thelastcodebender3661 7 жыл бұрын
how do you fix CORS error?
@lee_price
@lee_price 7 жыл бұрын
What is the benefit of: .map((res: Response) => res.json()); over .map(res => res.json()); They both give the same result?
@paulhalliday
@paulhalliday 7 жыл бұрын
+Lee Just implicitly stating the type of the response. TypeScript only, makes no difference to the transpiled code.
@mirandacraghead7196
@mirandacraghead7196 5 жыл бұрын
Thank you so much for this awesome video!
@paulhalliday
@paulhalliday 5 жыл бұрын
Thanks for watching! 🙌🙌
@sheetalsharma317
@sheetalsharma317 7 жыл бұрын
hello, can I pass a parameter in service provider ? because a new http request which I want to use is depends on this dynamic parameter...
@htmltuts1833
@htmltuts1833 7 жыл бұрын
I have a little problem. I have a long text in my database and i have already generated those data as a json. But when i render my app using those data that text doesn't have paragraphs. Whole text appearing as a one paragraph. Can you help me with this problem?
@thinkagain99
@thinkagain99 7 жыл бұрын
How do we make infinite scroll here if array length is more than 10 . Please help
@azizalyunanp7787
@azizalyunanp7787 7 жыл бұрын
what the different about ionic 2 and ionic 3 ? is it same ??
@raghunandan7706
@raghunandan7706 7 жыл бұрын
Side menu data updates after login. Any help would be appreciated.
@newtonmunene
@newtonmunene 7 жыл бұрын
Cannot find module generated with “Ionic g provider” when I import it to home.ts
@ok-fi1os
@ok-fi1os 7 жыл бұрын
Will this work with backand?????
@agentminus1
@agentminus1 7 жыл бұрын
i need to display data according to date..like automatically..without any clicks by user.. it changes every day..can you please suggest a solution..thanks
@AudriezWorld
@AudriezWorld 7 жыл бұрын
Hi Paul, do you have any video on how one can have a news app in Ionic using a news API? Please do help.
@paulhalliday
@paulhalliday 7 жыл бұрын
What news API are you thinking of? :)
@AudriezWorld
@AudriezWorld 7 жыл бұрын
Well I saw some free news Api from newsapi.org and was wondering how can I integrate it in my ionic app
@miryalkarakshay
@miryalkarakshay 6 жыл бұрын
You are a savior! Thanks for the video :)
@EduardoHernandez-sk7ip
@EduardoHernandez-sk7ip 7 жыл бұрын
when write .do((res : Response) => console.log(res)) an error : Argument of type '(res: Response) => void' is not assignable to parameter of type 'PartialObserver'. Type '(res: Response) => void' is not assignable to type 'CompletionObserver'. Property 'complete' is missing in type '(res: Response) => void'. appears :(
@nilupulnuwan1160
@nilupulnuwan1160 7 жыл бұрын
hello, can you tell how data transfer among ionic 2 and mysql database ? thank you
@paulhalliday
@paulhalliday 7 жыл бұрын
SQLite and Ionic 3 is something I've been meaning to cover for a while. I'll see if I can get this up soon.
@watsoncyrusanikwai3888
@watsoncyrusanikwai3888 7 жыл бұрын
Want to consume data from a REST API (Odata) with mysql as database.
@mithuns8410
@mithuns8410 7 жыл бұрын
My browser wont allow url without https, how to fix that i am getting console error while using http
@mrjeetmumbaikar8731
@mrjeetmumbaikar8731 5 жыл бұрын
can i retrieving data fron laravel localhost to ionic?
@adityapandit6509
@adityapandit6509 7 жыл бұрын
sir i am using my own rails api..but when i used .map((res: Response) => res.json()) it does not return json objects to console the only thing i get is responce and please let me know i am new to ionic
@samyassam9159
@samyassam9159 7 жыл бұрын
Domo Arigato :D !! Can you make a video about Bluetooth serial please sensei ?
@paulhalliday
@paulhalliday 7 жыл бұрын
I certainly can! It looks like it would be a fun video actually. :)
@samyassam9159
@samyassam9159 7 жыл бұрын
Paul Halliday Thanks a lot :DD you are the best :D
@medzjohnbaldono2343
@medzjohnbaldono2343 7 жыл бұрын
can you make a tutorial on how to display the file like docx, txt. or ppt, from mysql php server database into Ionic app ? Please..
@hadrieeriee3593
@hadrieeriee3593 7 жыл бұрын
Hello can you help me with data transfer between ionic and telegram
@shaggy6700
@shaggy6700 7 жыл бұрын
Yet another awesome video 🙂
@paulhalliday
@paulhalliday 7 жыл бұрын
Thanks Sagaya! It means a lot. :)
@alierensevinc7553
@alierensevinc7553 6 жыл бұрын
which extensions you use for ionic ? Thank you
@alierensevinc7553
@alierensevinc7553 6 жыл бұрын
I mean visual studio code extensions :D
@webinspire
@webinspire 6 жыл бұрын
do you have a solution for the CORS issues on the emulator? CORS is in my API enabled (Access-Control-Allow-Origin: *)
@fillmore200
@fillmore200 7 жыл бұрын
Does this still work on ionic 3 ? in the home.ts getMessages() function ,we can no longer reference getMessages().subscribe [Cannot read property 'subscribe' ] Would appreciate it if you could provide a workaround.
@chipekowasa6571
@chipekowasa6571 5 жыл бұрын
can't seen to get this to work on a device though
@TheCodebookInc
@TheCodebookInc 6 жыл бұрын
Cannot make post request with headers content-type: application/json
@Ing-wen
@Ing-wen 7 жыл бұрын
How to highlight unused symbols? like 5:28 (line 2) .
@nimeshmadhushka
@nimeshmadhushka 7 жыл бұрын
in the last line subscribe command is not working. any ideas for that??? getReadings() { this.semsService.getReadings().subscribe(data =>this.switchList = data) }
@Arshnaaz.
@Arshnaaz. 7 жыл бұрын
.subscribe(data => {this.customerList = data} );
@adir191
@adir191 7 жыл бұрын
clear and great explanation! thank u!
@paulhalliday
@paulhalliday 7 жыл бұрын
Thanks a lot. What would you like to see next?
@adir191
@adir191 7 жыл бұрын
Firebase with ionic 3 or credit card option.
@devillspdr
@devillspdr 7 жыл бұрын
what if my json contains more than a 100 of key/value pairs. How to show them in my template with *ngfor?
@paulhalliday
@paulhalliday 7 жыл бұрын
NgFor iterates over an array of values. Ensure you're iterating over an array and bind to the results with Angular's data binding. If you'd like to just show the entire key/value pairs in the view, use the JSON pipe: {{myArray | json}}
@devillspdr
@devillspdr 7 жыл бұрын
Paul Halliday I see ! thx a lot. didn't know about the json pipe. I Was going to make a custom pipe.
@anmolnarang8814
@anmolnarang8814 6 жыл бұрын
I'm getting the below error.. Plzz guide me what to do.. 'localhost:8100' did not find 'localhost:8100' in the Access-Control-Allow-Origin response header for cross-origin resources at 'localhost:100/api/'
@batsaikhanorgil9153
@batsaikhanorgil9153 7 жыл бұрын
can you make tutorial about angular 4 ?
@paulhalliday
@paulhalliday 7 жыл бұрын
Yup! Lots on the way regarding Angular 4 and Ionic 3.
@FxrrxtIII
@FxrrxtIII 7 жыл бұрын
how to import .txt to show on app ?
@inge81
@inge81 7 жыл бұрын
how send parameters?
@sheetalsharma317
@sheetalsharma317 7 жыл бұрын
thank you sir for this great video.. could you please tell me how to use services between firebase and ionic 3 ?? sir plz its a request to you... :D
@paulhalliday
@paulhalliday 7 жыл бұрын
Hi Sheetal, I'll be covering Firebase extensively pretty soon within my Learn Ionic 3 From Scratch course. www.udemy.com/learn-ionic-3-from-scratch Should be exciting! :)
@rafaelyahu
@rafaelyahu 7 жыл бұрын
Touch us about login with msql ?
@ilkeraksu1739
@ilkeraksu1739 7 жыл бұрын
thankyou paul
@Pedrobusou
@Pedrobusou 7 жыл бұрын
Hi Paul!, I need to provide an ApiKey in order to get my data, where can I do it? Im trying this, but seems not to be working. Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. I also get Error: Observable.throw is not a function getMessages() { let myHeaders: Headers = new Headers; myHeaders.set('ApiKey', "112BF5E5-76FC-494F-9A47-AD0E2CF5F3DD"); return this.http.get(this.url + "GetChainStores", myHeaders) .do(this.logResponse) .map(this.extractData) .catch(this.catchError) } Thanks in advice!
@paulhalliday
@paulhalliday 7 жыл бұрын
Hi Pedro, You'll have to add import 'rxjs/add/observable/throw' to use throw. I think I must have cut it off the video. With regard to your No-Access-Control-Origin issue, that's due to Cross Origin Resource Sharing (CORS). You're most likely getting that because you're trying to access a HTTP origin from your localhost. If you run it on the device with ionic run , this should circumvent the issue as file:/// doesn't count as an origin.
@Pedrobusou
@Pedrobusou 7 жыл бұрын
Hey, thanks a lot, im now conecting to the service but I cant still get the data, how do I provide the apikey? Error: 405 (Method Not Allowed)
@Pedrobusou
@Pedrobusou 7 жыл бұрын
Also i have just found this extansion that allows your chrome to run without the Allow-Control-Allow-Origin Error. chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en
@AstroFiero300
@AstroFiero300 6 жыл бұрын
Hi... I have a problen adding property "Authorization: Bearer myToken" into HttpHeaders, when i create "let header = new HttpHeaders();" and i do "header.set('Authorization', Bearer myToken)" (or .append(...) ), I get status=401, statusText: "Unauthorized" and not find property Authorization in header object... But when i create directly on "let header = new HttpHeaders({'Authorization': this.TokenType + ' ' + this.AuthToken})" i get status=0, statusText: "Unknown Error"... Can Anyone help me.
@AstroFiero300
@AstroFiero300 6 жыл бұрын
I found de solution. I've changed on backend (lumen 5.6) the file "public/index.php", adding two lines:
@CariagaXIII
@CariagaXIII 6 жыл бұрын
providers gets added automatically now
@EZEQUIELMATIASQUIROGA
@EZEQUIELMATIASQUIROGA 7 жыл бұрын
PERFECT!!!!!! TANKS
@yeffersonguarnizo4772
@yeffersonguarnizo4772 7 жыл бұрын
awesome, thanks bro :D
@naderal-ghazu2222
@naderal-ghazu2222 6 жыл бұрын
You should place "*ngFor" in the item tag, not the list tag, otherwise you are creating many lists instead of many items.
@JeffreyChaverra
@JeffreyChaverra 7 жыл бұрын
Thank you!!!!!
@paulhalliday
@paulhalliday 7 жыл бұрын
+Yeffrey Chaverra Thank you for watching!
@Mirrowed
@Mirrowed 7 жыл бұрын
sound volume is very low in video. need more louder
@awaisarif279
@awaisarif279 6 жыл бұрын
ERROR! .json() is not defined
@paulhalliday
@paulhalliday 6 жыл бұрын
Hi Awais, were you able to fix this?
@awaisarif279
@awaisarif279 6 жыл бұрын
First of all i'm happy to respond to me thanks for this some .json() is not working so i'm not using it and there is an other error i'm working with an api that respond (cross-origin request blocked)
@paulhalliday
@paulhalliday 6 жыл бұрын
I’d suggest looking into CORS and adapting your API to work with this. developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Network Detection with Ionic 2, Ionic Native and RxJS
12:45
Paul Halliday
Рет қаралды 14 М.
Ionic 3 - Lazy Loading Components
11:36
Paul Halliday
Рет қаралды 33 М.
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 7 МЛН
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 33 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 17 МЛН
Loading Remote JSON Data with HTTP in Ionic
14:38
Joshua Morony
Рет қаралды 61 М.
Ionic 3 - Firebase Email Login/Authentication
16:12
Paul Halliday
Рет қаралды 108 М.
How, Why, and When to Use Providers in Ionic
16:05
Joshua Morony
Рет қаралды 30 М.
Up and Running With Ionic 3 in 15 Minutes
15:15
Paul Halliday
Рет қаралды 44 М.
Ionic Caching Service
18:12
Simon Grimm
Рет қаралды 19 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
Don't Model the Problem
14:32
David Hart
Рет қаралды 30 М.
Ionic 3 - Lazy Loading Modules/Routes
6:04
Paul Halliday
Рет қаралды 35 М.
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 7 МЛН