I highly recommend adding the style='white-space:pre-wrap' style properties to ensure that the input and output comments display the correct format. in the comments component:
its really a nice tutorial for related to comments component. But I have one question where I can find comments service which you added on localhost:3000.
There are more than 2 in the repo. I don't know what is the problem github.com/monsterlessonsacademy/monsterlessonsacademy/tree/195-angular-building-comments-application
Nice tutorial. But i have some question . Can u help me a little bit Im edited your project a little bit as id:number; userId:number; parentId:number; And to app.component,html It's got error like: Type 'string' is not assignable to type 'number
Nice video tutorial, really helps a lot. Can you please make a further video for multiple levels of comments instead of just two levels of comments with a load more features in child comments?
You still need to deside how many levels you want to render. You can pass level property in every child comment and increase it with every nesting. Then you do the same thing -> you don't allow more nesting by attaching next level to previous.
Nice tutorial, the only thing was left is getting rid of the itertaion of comments. The comments that are replies to other comments must not be shown in the main comments list, because they already are shown as replied comments.
@@MonsterlessonsAcademy thank you Oleksandr for your reply. But they are still over there, if you check 1:11:52 you will see the comment "First comment first child" comment is still standing there. Probably you forgot to remove them.
@@MonsterlessonsAcademy I fixed it by adding another "mainComments" variable next to "comments" in the comment.ts file, so to render only the comments in which parentId is null.
@@nazarpashayev I ran into the same problem when developing a project. Could you write in more detail how to fix this bug? I will be very grateful to you
It is not bad by default but having lots of them in the app might be bad for the performance depending on the compexity of computations and renderings.
Brilliant vid, just followed it through and built it. Although with a live db and .Net back end. Looks to be working spot on! One thing, I couldn't seem to get working correctly was the 5 minutes time difference bit, the .getMilliSeconds() only returned back the millisecond portion of the current date time i.e. 123. Now I could be missing something here as I am a serious Javascript noob but I ended up doing it like -- const timePassed = Math.floor((( new Date().getTime() - new Date(this.comment.timestamp).getTime() ) / 1000 ) / 60) > 5
Hi you are totally right, it is my mistake. getMilliseconds just returns ms part and not the whole data in ms. getTime() is acorrect function for this.
WATCH NEXT: Angular with NgRx - Building Angular Project From Scratch - ua-cam.com/video/vcfZ0EQpYTA/v-deo.htmlsi=BptT7eqgflHIoQiQ
I really like those 1h+ projects. They make me get used to programming in angular and get good patterns of designing features. Thanks!
Great to hear!
I highly recommend adding the style='white-space:pre-wrap' style properties to ensure that the input and output comments display the correct format.
in the comments component:
its really a nice tutorial for related to comments component. But I have one question where I can find comments service which you added on localhost:3000.
I have a separate video about that. ua-cam.com/video/zTJzdMpoa8g/v-deo.html
thank ya maaan! That's mad
Thank you!
thanks for the vid , i got a problem when cloning your git porject i only get 2 files ?
There are more than 2 in the repo. I don't know what is the problem
github.com/monsterlessonsacademy/monsterlessonsacademy/tree/195-angular-building-comments-application
WOW ! BIG WOW TY VERY MUCH
You are welcome!
thanx 👍
You are welcome!
Nice tutorial. But i have some question . Can u help me a little bit
Im edited your project a little bit as
id:number;
userId:number;
parentId:number;
And to app.component,html
It's got error like: Type 'string' is not assignable to type 'number
I don't know what are exactly you changes. Somewhere you wrote a number type and you put there string.
@@MonsterlessonsAcademy Thanks for help. Your video was amazing!
Nice video tutorial, really helps a lot.
Can you please make a further video for multiple levels of comments instead of just two levels of comments with a load more features in child comments?
Thanks for the idea. I will add it to the list of future videos.
@@MonsterlessonsAcademy I would also love this!
Could you make a video about your vim setup?
It is already there
ua-cam.com/video/YrLiugDhCuk/v-deo.html
can you advice how to mplement multiple level instead of just two level of comments?
You still need to deside how many levels you want to render. You can pass level property in every child comment and increase it with every nesting. Then you do the same thing -> you don't allow more nesting by attaching next level to previous.
@@MonsterlessonsAcademy Do you think I could do it in the way that a level of comment will only be rendered when user clicks "more" ?
@@Addison8128 yes sure
Nice tutorial, the only thing was left is getting rid of the itertaion of comments. The comments that are replies to other comments must not be shown in the main comments list, because they already are shown as replied comments.
They are not shown in the main list because we filter main list by parentId null.
@@MonsterlessonsAcademy thank you Oleksandr for your reply. But they are still over there, if you check 1:11:52 you will see the comment "First comment first child" comment is still standing there. Probably you forgot to remove them.
@@MonsterlessonsAcademy I fixed it by adding another "mainComments" variable next to "comments" in the comment.ts file, so to render only the comments in which parentId is null.
@@nazarpashayev Happy to hear that you fixed that!
@@nazarpashayev I ran into the same problem when developing a project. Could you write in more detail how to fix this bug? I will be very grateful to you
Can u deploy this application
It was not planned for this video.
You are calling two functions in the template as I understand it, it's not very good for the performance
It is not bad by default but having lots of them in the app might be bad for the performance depending on the compexity of computations and renderings.
@@MonsterlessonsAcademy well I tested it and it called that function just one of the two about 300+ times, I had to massage the data I had in TS.
@@MonsterlessonsAcademy but I must add!! Thank you for the source code it did help a lot figuring out the component break-up
teste
qwe
rty
Brilliant vid, just followed it through and built it. Although with a live db and .Net back end. Looks to be working spot on! One thing, I couldn't seem to get working correctly was the 5 minutes time difference bit, the .getMilliSeconds() only returned back the millisecond portion of the current date time i.e. 123. Now I could be missing something here as I am a serious Javascript noob but I ended up doing it like -- const timePassed = Math.floor((( new Date().getTime() - new Date(this.comment.timestamp).getTime() ) / 1000 ) / 60) > 5
Hi you are totally right, it is my mistake. getMilliseconds just returns ms part and not the whole data in ms. getTime() is acorrect function for this.