Nested Comments in Angular - With Replies and Editing

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 54

  • @MonsterlessonsAcademy
    @MonsterlessonsAcademy  3 місяці тому

    WATCH NEXT: Angular with NgRx - Building Angular Project From Scratch - ua-cam.com/video/vcfZ0EQpYTA/v-deo.htmlsi=BptT7eqgflHIoQiQ

  • @wis6897
    @wis6897 2 роки тому +5

    I really like those 1h+ projects. They make me get used to programming in angular and get good patterns of designing features. Thanks!

  • @testtestovich8755
    @testtestovich8755 8 місяців тому +1

    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:

  • @stdioepic
    @stdioepic 2 роки тому +2

    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.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому

      I have a separate video about that. ua-cam.com/video/zTJzdMpoa8g/v-deo.html

  • @aminokn
    @aminokn Рік тому

    thank ya maaan! That's mad

  • @saifjuini4427
    @saifjuini4427 Рік тому

    thanks for the vid , i got a problem when cloning your git porject i only get 2 files ?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  Рік тому

      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

  • @ukaszkiepas57
    @ukaszkiepas57 Рік тому

    WOW ! BIG WOW TY VERY MUCH

  • @ilaanisdead
    @ilaanisdead Рік тому

    thanx 👍

  • @CuongPham-ci4ie
    @CuongPham-ci4ie 2 роки тому +1

    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

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      I don't know what are exactly you changes. Somewhere you wrote a number type and you put there string.

    • @CuongPham-ci4ie
      @CuongPham-ci4ie 2 роки тому

      @@MonsterlessonsAcademy Thanks for help. Your video was amazing!

  • @v4927s
    @v4927s 2 роки тому

    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?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      Thanks for the idea. I will add it to the list of future videos.

    • @MatthewBlake91
      @MatthewBlake91 Рік тому

      @@MonsterlessonsAcademy I would also love this!

  • @rabipant1097
    @rabipant1097 2 роки тому

    Could you make a video about your vim setup?

  • @Addison8128
    @Addison8128 2 роки тому

    can you advice how to mplement multiple level instead of just two level of comments?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому

      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.

    • @Addison8128
      @Addison8128 2 роки тому

      @@MonsterlessonsAcademy Do you think I could do it in the way that a level of comment will only be rendered when user clicks "more" ?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому

      @@Addison8128 yes sure

  • @nazarpashayev
    @nazarpashayev 2 роки тому

    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
      @MonsterlessonsAcademy  2 роки тому +1

      They are not shown in the main list because we filter main list by parentId null.

    • @nazarpashayev
      @nazarpashayev 2 роки тому

      ​@@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.

    • @nazarpashayev
      @nazarpashayev 2 роки тому +1

      @@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.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +2

      @@nazarpashayev Happy to hear that you fixed that!

    • @Иван-й3ы1м
      @Иван-й3ы1м 2 роки тому

      @@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

  • @vamshi_travelling_life
    @vamshi_travelling_life 2 роки тому

    Can u deploy this application

  • @anutaNYC
    @anutaNYC 7 місяців тому

    You are calling two functions in the template as I understand it, it's not very good for the performance

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  7 місяців тому

      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.

    • @anutaNYC
      @anutaNYC 7 місяців тому

      @@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.

    • @anutaNYC
      @anutaNYC 7 місяців тому

      @@MonsterlessonsAcademy but I must add!! Thank you for the source code it did help a lot figuring out the component break-up

  • @erikarafaeskysantos9027
    @erikarafaeskysantos9027 Рік тому

    teste

  • @yevheniivysotskyi1233
    @yevheniivysotskyi1233 2 роки тому

    qwe

  • @gixxerste
    @gixxerste 2 роки тому +2

    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

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      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.