Angular CRUD action using NGRX pattern and Material UI design | Angular NGRX examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • #angularcrud #angular #nihiratechiees #ngrx
    This video implements Angular CRUD action with below concepts
    1, Angular 16 CRUD Actions
    2, Angular NGRX pattern
    3, Angular Material UI Design
    4, JSON-SERVER REST API
    Steps Followed
    ==============
    1, Create brand new application
    ng new application-name
    2, Create required files ( components & supporting files)
    3, Installation required packages
    4, Implement design using Material UI components
    5, Implement NGRX flow
    Packages need to install
    ====================
    1, ng add @angular/material
    2, ng add @ngrx/store@latest
    3, ng add @ngrx/effects@latest
    4, ng add @ngrx/router-store@latest
    5, ng add @ngrx/store-devtools@latest
    6, npm install json-server
    json-server --watch src/data/db.json
    Source Code GitHub Link
    ====================
    github.com/nih...
    Join this channel to get access to perks:
    / @nihiratechiees

ความคิดเห็น • 46

  • @leonelperez1943
    @leonelperez1943 ปีที่แล้ว

    I love you my friend! Thanks for sharing your knowledge.

  • @CSDuck
    @CSDuck 11 หลายเดือนก่อน +2

    In an ocean of broken Angular projects I stumble upon this treasure!
    India is huge country with many of people, dialects and accents. Some are really hard to bear sometimes for long periods of time. But you are so well articulated that I could listen to you explaining things for hours.
    This tutorial is great and I would recommend to anyone interested in this technology to follow it from start to finish.
    I wish you all the best in programming, teaching and other aspects of your life!
    Best regards from Serbia!
    P.S. I noticed that you write things in small letters, for example "datasource" instead of "dataSource". It might be a silly question but iWasWonderingBecauseIGotUsedToTypeLikeThisBecauseOfJava. Is this convention wrong to use in TypeScript ?

    • @NihiraTechiees
      @NihiraTechiees  11 หลายเดือนก่อน

      Thanks for your wonderful words.
      There is no conversion issue... Sometimes if you declaring "Name" but you binding as "name". Then it will be problem so I always using small letters.
      Just for remembering

  • @VijayKumar-fq4ie
    @VijayKumar-fq4ie ปีที่แล้ว

    Good one bro

  • @parmeshwarchavan7458
    @parmeshwarchavan7458 6 หลายเดือนก่อน

    Very nice

  • @SumitKhanduri
    @SumitKhanduri 6 หลายเดือนก่อน

    quick question, in App.effect.ts file why you created it you could have created a reducer instead of an effect just to understand meaning instead of an effect file in common why you didn't created a reducer file in it

    • @NihiraTechiees
      @NihiraTechiees  6 หลายเดือนก่อน

      App.effect I created for handling alert only. It's not change/update our actual state.
      Just assume you have two different menu for both we created effect, reducer, state and action. Also if I included alert logic I just duplicating the alert code that's why created common effect file.
      For state modifications done through respective reducer

  • @minnumerinalex6262
    @minnumerinalex6262 11 วันที่ผ่านมา

    All the newly created associate's id is 0 and it is saved in db.json with id 0 and only the associate listing is showing is because of id+1 implementation in the effect. how to save the id properly? Please guide.

    • @NihiraTechiees
      @NihiraTechiees  11 วันที่ผ่านมา

      Json server api concept basically it will generate id automatically.. If you feel it's not generated. Pass the id also in the request (effect section)

  • @AlexsanderWilen-tw3sv
    @AlexsanderWilen-tw3sv 4 หลายเดือนก่อน

    hello! I hope you are well!! I have enjoyed your videos, your teaching, congratulations!!!
    to ask you a question, I have been trying to use this development with the form without opening it via popup but I am not able to do so after editing trying to insert the data it is not clearing it. When you have time, could you record a video with the form without using a popup? Thank you very much in advance.

    • @NihiraTechiees
      @NihiraTechiees  4 หลายเดือนก่อน

      Thanks. It's possible to achieve with normal form, will cover this in future videos

  • @mahdiandalib186
    @mahdiandalib186 ปีที่แล้ว

    thx, create a full web app using angular with admin panel

  • @kishoremukherjee6139
    @kishoremukherjee6139 5 หลายเดือนก่อน

    Your code has an issue, while adding the associate you are not making any change in id, you only update id for displaying. It affects the delete functionality. I pulled the code you have in github, and the problem is there in your code too. I wish you gave a solution for that

    • @NihiraTechiees
      @NihiraTechiees  5 หลายเดือนก่อน

      I am using json server api it will generate id automatically since you not provide any value

  • @abhikarne
    @abhikarne 4 หลายเดือนก่อน

    While Displaying data , Every time Api Got Called Or m I getting Wrong

    • @NihiraTechiees
      @NihiraTechiees  4 หลายเดือนก่อน

      That we can customize.... Every time if you calling api it will affect performance

  • @pranavverma37
    @pranavverma37 10 หลายเดือนก่อน

    tell me the differnce b/w ngrx entity and ngrx effect

    • @NihiraTechiees
      @NihiraTechiees  10 หลายเดือนก่อน

      Effect is the place for handling http services. Entity is the concept for code optimization ( if you have common function in different menu then we can create common entity)
      For more details follow my angular ngrx playlist

  • @jecica196
    @jecica196 ปีที่แล้ว

    I think I followed every step in that video,
    but I don't know why the API call is being triggered multiple times when saving the form.
    Could somebody help me? Here is the repository link:
    Is a Github link, and the account is TsaiTsaiChieh, repository name is ngrxcrud (TH-cam could not leave the link...)

    • @NihiraTechiees
      @NihiraTechiees  ปีที่แล้ว

      Will check and update you

    • @jecica196
      @jecica196 ปีที่แล้ว

      @@NihiraTechiees Thank you very much, I have been searching for a long time to debug, but I still don't know the reason...

    • @YtSeshomaru
      @YtSeshomaru 7 หลายเดือนก่อน

      Maybe it could the same problem. Cancel button triggers update too

  • @SumitKhanduri
    @SumitKhanduri 8 หลายเดือนก่อน

    Hi Nihira Sir,
    I am getting compile time error "Invalid number of arguments, expected 0" on line number 19 ie., "return loadAssociateSuccess({list: data})"
    i have followed exact step, i am on angular 17
    Please help !!

    • @NihiraTechiees
      @NihiraTechiees  8 หลายเดือนก่อน

      Did you run json server api?

    • @SumitKhanduri
      @SumitKhanduri 8 หลายเดือนก่อน

      @@NihiraTechiees yes sir my json server is running. I m on 33:00 till that time i have ran everything successfully. It just that on associate.effect.ts i am getting this issue on line number 19 of method “_loadassociate” and same on line number 21 also

  • @Naveenkumar-yy5hq
    @Naveenkumar-yy5hq 10 หลายเดือนก่อน

    How add vertical screen bar in this table

    • @NihiraTechiees
      @NihiraTechiees  10 หลายเดือนก่อน

      Check my material UI series

  • @venkatkalyan6606
    @venkatkalyan6606 10 หลายเดือนก่อน

    Am getting error at 1:06:58 getassociatesucess({obj:data})
    It says type asssociates is missing the following properties ….
    In actions.ts the expected type comes from property obj which is declared here on type ‘{obj :Associates } ‘
    Can someone help me with this

    • @NihiraTechiees
      @NihiraTechiees  10 หลายเดือนก่อน

      Have you created interface associates

    • @venkatkalyan6606
      @venkatkalyan6606 10 หลายเดือนก่อน

      @@NihiraTechiees yes I did

    • @NihiraTechiees
      @NihiraTechiees  10 หลายเดือนก่อน

      Look like it's not imported top.

    • @venkatkalyan6606
      @venkatkalyan6606 10 หลายเดือนก่อน

      @@NihiraTechiees I did import too

    • @venkatkalyan6606
      @venkatkalyan6606 10 หลายเดือนก่อน

      @@NihiraTechiees also at 1:08:54
      This.store.dispatch (getassociate{Id : code})
      Am greeting error for id : code saying
      Argument of type '{ code: number; }' is not assignable to parameter of type 'Action'.
      Object literal may only specify known properties, and 'code' does not exist in type 'Action'.

  • @athul03
    @athul03 9 หลายเดือนก่อน

    What is this associate? is it same as admin?

    • @NihiraTechiees
      @NihiraTechiees  9 หลายเดือนก่อน

      It's just like customer just master screen

  • @josephcamillus7447
    @josephcamillus7447 ปีที่แล้ว

    41:12 I don't get data in array. What can I do?

    • @NihiraTechiees
      @NihiraTechiees  ปีที่แล้ว

      Are you getting any error?

    • @josephcamillus7447
      @josephcamillus7447 ปีที่แล้ว

      Thanks for teaching such a real time projects, it helped us to develop our skills. Thanks a lot❤

  • @gfxtechstudio6965
    @gfxtechstudio6965 9 หลายเดือนก่อน

    Peoples like you make things worse, by writing un-maintainable code and increasing company cost. These things can be achieved with 50% less code as well.

    • @NihiraTechiees
      @NihiraTechiees  9 หลายเดือนก่อน +1

      Please understand TH-cam videos are just sharing ideas and concepts. It's not final solutions.