those who are getting error here "propertiesArray.push(data[id]);" solution is " propertiesArray.push(data[id as keyof object]);"
@meseretzewde95362 жыл бұрын
thanks
@fridi4192 жыл бұрын
is this done to tell typescript id is a field of the object and not a string?
@shashankshukla54382 жыл бұрын
Or just make the typeof data to any in map( (data: any).... not sure if this violates TS laws of strict type or not!
@shashankshukla54382 жыл бұрын
Also @Sandeep Kumar, would you be kind enough to explain what's going on here? data[id as keyof Object], the as keyof Object part? I did not understand why it works or how it works, TS docs isn't helpful at all! T.I.A.
@rahamathullahibrahim9303 Жыл бұрын
Thanks For the Solution.. it works perfectly...
@AJSpeller4 жыл бұрын
I like your work. Please continue with the great tutorials.
@Saveyy14 жыл бұрын
at 3:07 adding constructor(private housingService: HousingService) { this.properties = []; } removes the error for me.
@subhamsoy12803 жыл бұрын
thanks
@thui093 жыл бұрын
Thank you sir, you saved my life
@StudyMash3 жыл бұрын
Really
@chuchotech55132 жыл бұрын
hello, I got an error when I introduce this line propertiesArray.push(data[id]); (TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'.) so,I have to introduce in the tsconfig this option "suppressImplicitAnyIndexErrors": true, and stop and start the angular project
@nawelmeziane4542 жыл бұрын
thank you so much , I got this error and I didn't know what to do until I read your comment
@akgg7834 Жыл бұрын
wasted one day and then after this message I was able to fix. thanks for the update
@nylonnalini Жыл бұрын
I got a Deprecation error on using "suppressImplicitAnyIndexErrors" and had to add '"ignoreDeprecations": "5.0"' to tsconfig to get it to work.
@ConstantinAlexandru-xf5zn7 ай бұрын
adding definite assignment assertion "!" to the @Input fixed my error export class PropertyCardComponent { @Input() property!: IProperty; }
@michca1233 жыл бұрын
Please help. Pause at 2:57 to 2:58 i get an error line 18: data[id] is underlined red The message is: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053)
@StudyMash3 жыл бұрын
Can you give me the github link to your code
@ntt2k4 жыл бұрын
Can you explain why you decided to: return this.http.get('data/properties.json') in your housing.service. ts, with a pipe & map? How would it be different from: return this.http.get('data/properties.json') Do they deliver the same results? The pipe/map seems like there's a lot more confusing code involved, unless there is a benefit to using them. Can you please clarify? Thanks.
@StudyMash4 жыл бұрын
Agree, it will work perfectly with your code without pipe and map as well upto this point, But in case you would like catch some error or handle that in service method only, you will have to use pipe operate to intercept the same. And also in this tutorial we will further filter the data specific for sell or buy flag , so just wanted to show how we can intercept the response in using pipe and we can manipulate or map it to any other kind of object using map operator. Thanks for sharing your example and question, it really helps other as well to understand the concepts.
@ntt2k4 жыл бұрын
@@StudyMash Thanks for the explanation! Your channel is definitely underrated. I hope more people stumble across this channel, as I have, because you do explain these concepts really well!
@StudyMash4 жыл бұрын
Thanks a lot buddy, such appreciations really keep me motivated to improve me more and more.
@paskahlsimarmata1373 жыл бұрын
why my data[id] error in 2:29...Please Help
@kumarvivek46653 жыл бұрын
same error i got !! any solution?
@mrtrader3661 Жыл бұрын
I have error in this line: propertiesArray.push(data[id]); no index signature with a parameter of type 'string' was found on type 'object' angular
@tanweerkhan47514 жыл бұрын
"The element is implicitly of type "any" because the expression of type "string" cannot be used for the index type "Object". No index signature with a parameter of the type "string" was found for the type "object". Ts (7053)" I will be thanksfull for your support
@fatimashehzadi86044 жыл бұрын
i have the same error its gone by writting "suppressImplicitAnyIndexErrors": true, in 'tsconfig.json' i hope this will help.
@fatimashehzadi86044 жыл бұрын
let me know if its help full or not?
@nawalfatima62203 жыл бұрын
@@fatimashehzadi8604 lots of duas for you girl i was stuck on it so bad. lots of prayers. stay blessed
@fatimashehzadi86043 жыл бұрын
@@nawalfatima6220 Ameen! thanks a lots
@akshitapurohit91453 жыл бұрын
Hi@@fatimashehzadi8604 , I was stuck at same point, its now working fine with "suppressImplicitAnyIndexErrors": true, however the data[id] in service file is still showing red underline, is that okay?
@sohaibalvi69892 жыл бұрын
data => { const propertiesArray : Array =[]; for(const id in data) { if(data.hasOwnProperty(id)) { propertiesArray.push(data[id]); } } return propertiesArray; } Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'. propertiesArray.push(data[id]);
@muhammadgul10492 жыл бұрын
nice
@abinkrajan23293 жыл бұрын
Hi sir, I get TS7053 error when using properties.push(data[i])
@StudyMash3 жыл бұрын
Can you share the github link to your code
@varghamehregan11833 жыл бұрын
I got the same Error ( No index signature with a parameter of type 'string' was found on type 'Object'.)
@punit2027019 күн бұрын
what is observable and observer in angular?
@StudyMash16 күн бұрын
Observable: Produces data streams. Observer: Consumes and reacts to data streams emitted by an Observable
@DreamCatcher2012 жыл бұрын
Following in March 2022: The Webpack 5 has come out -- "console.log" will not work. error TS2307: Cannot find module 'console' or its corresponding type declarations. 3 import { Console } from 'console';
@avinashg20083 жыл бұрын
@Input() property: IProperty; "Here I am getting 'property' has no initializer and is not defined in constructor" error. If I set it to undefined as well then property in template starts giving error. Please comment. Thanks for another excellent video
@StudyMash3 жыл бұрын
Is that defined in constructor
@Saeefar4 жыл бұрын
I am getting following errors 1... "Property 'properties' has no initializer and is not definitely assigned in the constructor.", 2.... "Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.",
@nawalfatima62203 жыл бұрын
first one is resolved by initializing in constructor read previous comment by savvey1
@nawalfatima62203 жыл бұрын
for second error see above comment
@MrMoffettbrandon3 жыл бұрын
go to tsconfig.json and set "strict" : false to fix
@arnabpattanayak82893 жыл бұрын
@@MrMoffettbrandon It works for me. Thank you a lot 🙏
@greencoder37953 жыл бұрын
Set "strict":false in tsconfig.json file , it worked for me
@sohampatra12072 жыл бұрын
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053) "What to do for this error"
@DB-zh8gy2 жыл бұрын
have the same problem any solution?
@aslamhossain84352 жыл бұрын
same problem
@naveenkumarshetty6502 жыл бұрын
same issue
@fridi4192 жыл бұрын
@@aslamhossain8435 did u fix
@shashankshukla54382 жыл бұрын
make these adjustments: map( (data:any).... rest remains the same. Here you're telling TS that the data you're receiving is an "ANY" type object and NOT an "Object" type. I think it violates the TS laws but that's just the workaround I found. @StudyMash AM I correct here?
@PriyankaSharma-qt4nt Жыл бұрын
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053) how to solve this error??
@vaynard944 жыл бұрын
why intellisense in my vs code does not show the property attribute like yours? But if I mistype it ex. property.Nmae, it will show error "Propery 'Nmae' does not exist on type 'IProperty'".
@vaynard944 жыл бұрын
got the answer, Angular Essentials didnt installed properly. Thank you
@kasperkat20044 жыл бұрын
@@vaynard94 I also had that problem. I disabled it, then enabled it and restarted vs code. now it works. I also uninstalled some other intellisense extensions as they may have been interfering.
@somaihamza15163 жыл бұрын
@@kasperkat2004 it worked for me but it shows object object ( excuse me but this angular is a pain in the ass)
@vaynard944 жыл бұрын
Is this interface the same as class in c#? but in different concept?
@StudyMash4 жыл бұрын
Purpose is same to define a contract with the type that implement it.
@vaynard944 жыл бұрын
sounds interesting. will there be back end session in this course? or should i look in "Build Real World Web Application with ASP.NET Core and MVC Framework"? thank you
@StudyMash4 жыл бұрын
Yes, I will connect it with backend, but meanwhile it is good to get some idea from that course.
@nawalfatima62203 жыл бұрын
im unable to access data id this is the error im gettin in vs code : Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053) if i try to console log data in service file in for in loop i get the whole array.but in the same code block im unable to access id from the data object
@StudyMash3 жыл бұрын
If you can provide the github link to your code I can look where the problem is
@lipunpatel95993 жыл бұрын
@@StudyMash Hi Sir, I am also getting the same error - github link - github.com/lipun619/HSPA.git Please look into it once
@tendulkrish35733 жыл бұрын
@@lipunpatel9599 same problem here also. Did you got any solution?
@MrMoffettbrandon3 жыл бұрын
go to tsconfig.json and set "strict" : false to fix
@phuongngaphan25253 жыл бұрын
@@MrMoffettbrandon oh i fixed it, thank you
@danieletilocca76373 жыл бұрын
i have the problem 'Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.'. i tried writing "suppressImplicitAnyIndexErrors": true, in 'tsconfig.json', but it doesn't work. any help?
@danieletilocca76373 жыл бұрын
if it doesn't work and i can't fix it, can i use "any" and continue the playlist without following this video? thanks
@StudyMash3 жыл бұрын
Ok if you are able to go with any, you can proceed with that. Do you have this code available on github, may be I would be able to find the issue if you can provide me github link
@danieletilocca76373 жыл бұрын
@@StudyMash it's weird because now it seems it works, there aren't any errors, but i don't see the list of properties when i use "ng serve"... it only appears the nav-bar. i try to upload on github
@danieletilocca76373 жыл бұрын
how can i give you the link of github?
@StudyMash3 жыл бұрын
you can watch this (kzbin.info/www/bejne/gKW1f5ispNl3Zqs) video to learn how to add your code to github repository, in that way, when ever you have problem you can share the link to me and I can look your code.
@Chan_16412 жыл бұрын
Hi sir. Can you share this Particular Tutorial Source, To Clear my Errors and Doubts
@StudyMash2 жыл бұрын
github.com/webtrainer-in/HSPA
@maheshuppala714 жыл бұрын
Error: src/app/services/housing.service.ts:20:32 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'. 20 propertiesArray.push(data[id]); I am getting this error please helpme
@StudyMash4 жыл бұрын
Seems you have not initialized properties Array as an array.
@daniwalker19964 жыл бұрын
@@StudyMash how to initialized ? any body can help??
@daniwalker19964 жыл бұрын
did you solve it ?
@nehemiahlimocheburet14114 жыл бұрын
how did you solve it?
@nehemiahlimocheburet14114 жыл бұрын
am still waiting for some response on this, hello @Study Mash
@tripshower2all3 жыл бұрын
How to handle httperror inside pipe
@TaniaAkter-ql4ow4 жыл бұрын
Hi,Sir...now I'm ur big fan...Thanks a lot...But when i import interface in my list.component.ts file I got an error:Can't find module'../IProperty.interface'....Please help me.....
@StudyMash4 жыл бұрын
You must be not pointing it to the correct folder where you have placed your interface.
@TaniaAkter-ql4ow4 жыл бұрын
@@StudyMash I created interface file in property folder...please tell me where should I create interface???
@StudyMash4 жыл бұрын
@@TaniaAkter-ql4ow It doesn't matter where you create your interface, but when importing it in any other file you will have to correctly point to that directory. Otherwise you will get error.
@srinivasrapaka4729 Жыл бұрын
This error will caused by failure of the ng server u can run with different port it will work