Using Service and HTTP calls in Angular 9

  Рет қаралды 32,476

Study Mash

Study Mash

Күн бұрын

Пікірлер: 83
@abhaygupta7258
@abhaygupta7258 4 жыл бұрын
There is a lot of learning from your tutorial ..please keep making videos
@abhayyadav4270
@abhayyadav4270 Жыл бұрын
sir mera help kr skte h
@TheinHtay-x7y
@TheinHtay-x7y Жыл бұрын
Thanks you so much for sharing. I get a lot of knowledge. It is very helpful for me.
@syedmohsinali8485
@syedmohsinali8485 4 жыл бұрын
The concept you are define in any part which clear and understandable.
@GaneshKumar-ne2ms
@GaneshKumar-ne2ms 3 жыл бұрын
Sir excellent explanation about services. Thanks.
@kasperkat2004
@kasperkat2004 4 жыл бұрын
The music is good--the course is excellent!
@StudyMash
@StudyMash 4 жыл бұрын
Thanks Kasper, I was thinking to change music in my next video, I was planning to add intro after few minute of discussion instead of playing at start of video.
@amitoshkumar7473
@amitoshkumar7473 3 жыл бұрын
Great effort.. Keep it up.
@ritamghosh3550
@ritamghosh3550 Жыл бұрын
Thank you very much, it helped me a lot........
@greencoder3795
@greencoder3795 3 жыл бұрын
Awesome content , i am learning a lot from your video , thank u sir.
@StudyMash
@StudyMash 3 жыл бұрын
Glad to hear that, thanks for taking time for appreciating.
@vaynard94
@vaynard94 4 жыл бұрын
Greeting from Indonesia. Keep up the good work
@StudyMash
@StudyMash 4 жыл бұрын
Thanks, hope everything is fine in Indonesia
@vaynard94
@vaynard94 4 жыл бұрын
@@StudyMash Thank you, hope its fine too in your country. My opinion, your tutorial video is awesome. The given information, details, tips and tricks and how to do it are so great. I enjoyed it so much. Cannot wait to learn on your next videos.
@devenshah3653
@devenshah3653 4 жыл бұрын
so far so good, following it closely.
@DecentProgrammer
@DecentProgrammer 4 жыл бұрын
nice video
@gauravlamba4820
@gauravlamba4820 2 жыл бұрын
It keeps showing me this error although my data folder is inside the src and at same level as app-"Failed to load resource: the server responded with a status of 404 (Not Found)".. what do i do ?
@BaljeetKaur-jl3se
@BaljeetKaur-jl3se 3 жыл бұрын
Please make project using database, EF core for services
@pascalsegoete1706
@pascalsegoete1706 4 жыл бұрын
Hello I'm having this issue I cant seem to find a proper fix import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-property-list', templateUrl: './property-list.component.html', styleUrls: ['./property-list.component.css'] }) export class PropertyListComponent implements OnInit { properties: Array; ☠//its says 'properties' has no initializer and is not definitely assigned in the constructor.☠ constructor(private http:HttpClient) { } ngOnInit(): void { this.http.get("data/properties.json"). subscribe((data) =>console.log(data)) } }
@akshitapurohit9145
@akshitapurohit9145 3 жыл бұрын
Hey! Were you able to identify the resolution? I am stuck at the same step
@pascalsegoete1706
@pascalsegoete1706 3 жыл бұрын
@@akshitapurohit9145 No I'm still stuck there
@akshitapurohit9145
@akshitapurohit9145 3 жыл бұрын
@@pascalsegoete1706 It started working for me with below: properties: any;
@pascalsegoete1706
@pascalsegoete1706 3 жыл бұрын
@@akshitapurohit9145 Thank you very much for finding a solution to this problem I can finally continue with the progress 🙏
@chuchotech5513
@chuchotech5513 2 жыл бұрын
I had back to this video because it is not clear for me what data means in the code. I guess when you say data=>console.log(data) you are implementing an arrow function used in ES6? and the value in data coming from the http.get() the json file, correct? is data an array?
@StudyMash
@StudyMash 2 жыл бұрын
Data is what ever we get in the response, it can be string, number or anything. Here in this case it contains array.
@georgecosminmarinica6656
@georgecosminmarinica6656 Жыл бұрын
For anyone getting the error 404 not found! PAY ATTENTION TO THE ASSETS SECTION, I had this issue because i added the src/data folder in the test assets category, you need it to add it to the first one in angular.json, in the build section
@shubhamjain3101
@shubhamjain3101 11 ай бұрын
Thanks, yes and to be specific, you are talking about angular.json file
@noorulaarefinsyed4393
@noorulaarefinsyed4393 2 жыл бұрын
in the latest version of angular , i am getting error of Property 'subscribe' does not exist on type ! help ?!
@jonsnow3909
@jonsnow3909 2 жыл бұрын
try this subscribe({ next: data => { this.properties = data; console.log(data) }
@greencoder3795
@greencoder3795 3 жыл бұрын
Can we do all stuffs in visual studio 19 rather than in visual studio code ?
@StudyMash
@StudyMash 3 жыл бұрын
Yes, you can do
@faraazahmed9631
@faraazahmed9631 Жыл бұрын
404 not found. Can anyone please help me to progress further. My folder is placed in correct place, and also added the strictInitialization to false, but still getting 404 error. I’m stuck can anyone help please
@chandanadas7860
@chandanadas7860 4 жыл бұрын
getEmployees():Observable why dont you use this type of conversion of Observable.??im confused its required or not? Please reply
@StudyMash
@StudyMash 4 жыл бұрын
Yes you can use that as well
@ashrithsista3667
@ashrithsista3667 4 жыл бұрын
I have done the same process what have been shown in this module... but after running the application the data was not showing in the browser. In console it is showing error " Failed to load resource: the server responded with a status of 404 (Not Found)" .
@StudyMash
@StudyMash 4 жыл бұрын
Data file must be at different folder than the one service is looking for
@ashrithsista3667
@ashrithsista3667 4 жыл бұрын
@@StudyMash Thank you. It Worked.
@catan.sales0160
@catan.sales0160 4 жыл бұрын
Hi Buddy! The http GET method for fetching data from folder data/properties.json is not works! message: "Http failure response for localhost:4200/data/properties.json: 404
@catan.sales0160
@catan.sales0160 4 жыл бұрын
I figured it out! please ignore this question!
@amanjain3698
@amanjain3698 3 жыл бұрын
i also want that answer plzz help me when you got it @Catan. SALES01
@SeemaNelouferSN
@SeemaNelouferSN 3 жыл бұрын
@@catan.sales0160 please help!
@kasperkat2004
@kasperkat2004 4 жыл бұрын
Hi all, I suggest using this on .json files: Fix JSON (Oliver Sturm) . It's on VScode.
@iftekharahmed7874
@iftekharahmed7874 4 жыл бұрын
When this project will complete?? Bro
@carloscabrera3127
@carloscabrera3127 Жыл бұрын
Error: 'HttpClientModule' does not appear to be an NgModule class.(-996002)
@TOPTECHY8
@TOPTECHY8 3 жыл бұрын
Cannot GET /data/properties.json
@jayakumar2927
@jayakumar2927 3 жыл бұрын
I have follow your video same settings but not working API can you resolve this
@StudyMash
@StudyMash 3 жыл бұрын
Can you provide github link to your code ?
@jayakumar2927
@jayakumar2927 3 жыл бұрын
@@StudyMash i have mailed you check and let me know
@TOPTECHY8
@TOPTECHY8 3 жыл бұрын
Failed to load resource: the server responded with a status of 404 (Not Found)
@lgiorgos1
@lgiorgos1 4 жыл бұрын
why not subscribe in the service and store the data in the service? In this way I guess you would have global access to it.
@StudyMash
@StudyMash 4 жыл бұрын
Sorry buddy, did not get, could you please provide an example ?
@lgiorgos1
@lgiorgos1 4 жыл бұрын
@@StudyMash for example in http.service.ts export class HttpService { property: object={} getAll(){ return this.http.get(`api_url`).subscribe(data => this.property = data); } }
@henimex
@henimex 3 жыл бұрын
For Property initialization failed error you can add "strictPropertyInitialization": false to tsconfig.json file
@devenshah3653
@devenshah3653 2 жыл бұрын
that worked. Thanks.
@daniwalker1996
@daniwalker1996 4 жыл бұрын
i am getting error data is not coming
@saurabh8378
@saurabh8378 3 жыл бұрын
Error: Property 'properties' has no initializer and is not definitely assigned in the constructor.
@akshitapurohit9145
@akshitapurohit9145 3 жыл бұрын
Hey! I am getting the same error. Were you able to figure out the resolution?
@saurabh8378
@saurabh8378 3 жыл бұрын
Try adding "strictPropertyInitialization": false under angularCompilerOptions in tsconfig.json @@akshitapurohit9145
@amulyavn5660
@amulyavn5660 3 жыл бұрын
@@saurabh8378 Thanks a lot! Even I was facing the same error ,your solution helped
@franmilisavljevic145
@franmilisavljevic145 Жыл бұрын
I know its kinda late but what worked for me was adding import { HttpClient } from '@angular/common/http'; at the top of my property-list.components.ts file.
@vivekgajjar1469
@vivekgajjar1469 4 жыл бұрын
please work a api and after get data
@Sai-vi2wi
@Sai-vi2wi 2 жыл бұрын
what is you git account name
@StudyMash
@StudyMash 2 жыл бұрын
github.com/webtrainer-in/HSPA
@rathinakarthi2360
@rathinakarthi2360 3 жыл бұрын
It is throwing NOT FOUND 404 error
@jayakumar2927
@jayakumar2927 3 жыл бұрын
I have mailed to you my github repo. can you reply
@StudyMash
@StudyMash 3 жыл бұрын
seems you have deleted the github link. But from the screen shots you sent on mail, it look like you have not the entry of data in angular.json file in assets node. Please check if you have entry for data as shown below in angular.json file "assets": [ "src/favicon.ico", "src/assets", "src/data" ],
@SeemaNelouferSN
@SeemaNelouferSN 3 жыл бұрын
Failed to load resource: the server responded with a status of 404 (Not Found)
@SeemaNelouferSN
@SeemaNelouferSN 3 жыл бұрын
Cannot GET /data/properties.json
@StudyMash
@StudyMash 3 жыл бұрын
It is available on git repository
Modify HTTP Data using Pipe
6:35
Study Mash
Рет қаралды 30 М.
Template Driven Forms in Angular
19:11
Study Mash
Рет қаралды 19 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Understand Routing - Part 3
17:35
Study Mash
Рет қаралды 17 М.
Understand Routing - Part-1
6:47
Study Mash
Рет қаралды 19 М.
Create property list
9:55
Study Mash
Рет қаралды 27 М.
Component workflow and create property card component
17:01
Study Mash
Рет қаралды 39 М.
Angular Tutorial - 20 - HTTP and Observables
7:41
Codevolution
Рет қаралды 679 М.
HTTP Middlewares in golang (1/2)
12:54
Krishna Iyer HQ
Рет қаралды 307
Save Data to Local Storage in Angular | Angular Tutorial
17:12
Study Mash
Рет қаралды 58 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН